How to create a Simple PHP Mailer?

angola_g

Newbie
Joined
Mar 30, 2008
Messages
3
Reaction score
0
Hello any one there ?I need assistant to create a simple PHP mailer either hosted or cracked that could last for say 4 or 5 days. Can any one help me with this?

Contact me as soon as possible.
 
i think your best bet is just to buy a program that way you can learn how to do email campaigns
 
Try
Code:
phpmailer.codeworxtech.com/
www.swiftmailer.org/
bellonline.co.uk/web-services/free/scripts/php-mailer-script/

all free scripts.

Or just google "PHP MAILER"
and you'll get a looooong lit of them.

Or if your looking to code your own
then google "PHP MAILER CODE"
 
Can you code a very simple PHP mailer I can use. I am new to PHP programming.
Thanks
 
hosting can banned my site if using this program? because its spam.
 
yeah, how do you get around being banned for using php mailing scripts. everytime i use one they suspend my account immediately. is there a way to mask/hide the mass mailing from the web host admin?
 
using this :
$to = 'email[dog]domain.com' . ', '; // note the comma
$to .= 'wez[dog]example.com';
mail($to,$subject,$message,$headers); to know more about the mail() function plz read php.net
 
It is very easy to create this in php as well as a quick from end, especially if you have a mysql server to use.
 
Just use PHPMailer; it's an existing class and will save you a ton of hassle. If you want to send bulk, PHP isn't a good option anyway. There's nothing stopping you from a basic loop through your email address array. You can get PHPMailer at phpmailer [dot] worxware [dot] com (I have no involvement in PHPMailer).

Example:

Code:
require_once('/path/to/phpmailer.php');

// this is your list of emails
// in particular, this assumes email only
$emails = file_get_contents('email.txt');
$pmail = new PHPMailer();

// set most of your settings here
//   (from, subject, content, etc.)
//   you can also spin content, 
//      randomize subject lines, etc.
//      if you want

// approach #1
foreach($emails as $email){
     $pmail->AddAddress($email);
      if(!$pmail->Send()){
            // send error to log 
      }else{
           // log success
      }
}

// approach #2
//   looks more "natural"
//   and more efficient (only one call to the server's mailer program)
foreach($emails as $email){
     $pmail->AddBCC($email);
}

if(!$pmail->Send()){
     // log the error
}
 
Last edited:
Back
Top