1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to create a Simple PHP Mailer?

Discussion in 'PHP & Perl' started by angola_g, May 26, 2008.

  1. angola_g

    angola_g Newbie

    Joined:
    Mar 30, 2008
    Messages:
    3
    Likes Received:
    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.
     
  2. cash80

    cash80 BANNED BANNED

    Joined:
    May 5, 2008
    Messages:
    20
    Likes Received:
    0
    i think your best bet is just to buy a program that way you can learn how to do email campaigns
     
  3. razohad

    razohad Jr. VIP Jr. VIP Premium Member

    Joined:
    Jan 11, 2008
    Messages:
    701
    Likes Received:
    1,005
    Occupation:
    Software engginer
    Location:
    online most of the time
    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"
     
    • Thanks Thanks x 1
  4. Essential Clix

    Essential Clix Executive VIP Premium Member

    Joined:
    Jul 30, 2007
    Messages:
    1,755
    Likes Received:
    2,791
    Location:
    USA
  5. angola_g

    angola_g Newbie

    Joined:
    Mar 30, 2008
    Messages:
    3
    Likes Received:
    0
    Can you code a very simple PHP mailer I can use. I am new to PHP programming.
    Thanks
     
  6. azzura

    azzura Newbie

    Joined:
    May 15, 2008
    Messages:
    6
    Likes Received:
    2
    hosting can banned my site if using this program? because its spam.
     
  7. mwari23

    mwari23 BANNED BANNED

    Joined:
    Apr 5, 2008
    Messages:
    143
    Likes Received:
    29
    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?
     
  8. cash80

    cash80 BANNED BANNED

    Joined:
    May 5, 2008
    Messages:
    20
    Likes Received:
    0
    yes there is...if you are interested contact me
     
  9. barigain

    barigain Junior Member

    Joined:
    Aug 23, 2012
    Messages:
    100
    Likes Received:
    12
    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
     
  10. Foxy999

    Foxy999 Newbie

    Joined:
    Dec 30, 2012
    Messages:
    49
    Likes Received:
    4
    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.
     
  11. solventnine

    solventnine Junior Member

    Joined:
    Dec 4, 2009
    Messages:
    113
    Likes Received:
    16
    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: Feb 20, 2014