Jump to content

Search the Community

Showing results for tags 'php mailer'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. I am using PHP Mailer to send out emails to an array of email address. So I am looping through the array of emails and then sending out the emails individually. The script works except it is sending out more than one email to some of the email address. Today my client told me that he got 2 more emails on Sunday just like the 2 he got on Thursday. I am assuming that this has something to do with caching, but I do not know. The trigger that sends out the emails is part of a cron job. The cronjob runs every 30 minutes. Checks to see if there is a new entry in one of the tables in the database. Then it sends out the email to all of the members. After the email is sent a value is changed for that entry in the data base. I am explaining this only to help you to see that the problem is not that the code is being triggered again. If that was the problem then there would be and email every 30 minutes and that is not what happened. Here is the code: <?php require_once('library/PHPMailer/class.phpmailer.php'); require_once('library/PHPMailer/class.smtp.php'); foreach($organizationemails as $key => $value){ $contents = '<body> <div> <p> ...content of email ... </p> </div> </body>'; error_reporting(E_ALL); error_reporting(E_STRICT); $mail = new PHPMailer(); $body = $contents; $body = preg_replace('/[\]/','',$body); $mail->IsSMTP(); $mail->Host = "ssl://smtp.mysite.org"; $mail->SMTPAuth = true; $mail->Port = 465; $mail->Username = "sendingmail@mysite.org"; $mail->Password = "password"; $mail->SetFrom('info@mysite.org', 'My Organization'); $mail->AddReplyTo('info@mysite.org', 'My Organization'); $mail->Subject = 'My Email Title'; $mail->AltBody = '... has been posted...'; $mail->MsgHTML($contents); $address = $value; $mail->AddAddress($address); if(!$mail->Send()) { echo "Message could not be sent. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit; }else{ echo "Message has been sent to ".$value; } } ?>
  2. hi, is there a way to show the e.g "via blahblah.com" in the recipients email header ? because if I do e.g "From: sender fullname <sender@email.com> via email.com" and send the mail..what am seeing is sender fullname<sender@email.com> via email.com subject when opening the inbox, it is appended in the sender's name what i want to see when the recipient opens the inbox is the Full Name subject then when he/she clicks that row of email from the inbox, he/she will see the Full Name <sender@email.com> via email.com at the email header..is that possible in the built-in php mail function or the phpmailer library ? coz i have browsed the manual, i can't see a solution for this
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.