[nycphp-talk] Email Signup Script
Thomas O'Neill
tommyo at gmail.com
Tue Aug 31 09:28:37 EDT 2004
May I suggest that when sending your email you might want to look at
using the phpmailer class.
I have found that the best way to keep the mail out of MSN/Yahoo/and
the likes junk mail boxes is to deliver the mail from an actual
account on your system.
I create an account for outgoing mail called system at mydomain.com and
use the SMTP functions in the phpmailer class to send the outgoing
mail from that user.
(phpmailer also supports multi type email for attachments or HTML email)
http://phpmailer.sourceforge.net/
Check it out:
//Create a new Mailer Object
$mailer = new PHPMailer();
$mailer->IsSMTP();
// SMTP server
$mailer->Host = "mail.mydomain.org";
// Outgoing mail server username
$mailer->Username = "username";
// Outgoing mail server pasword
$mailer->Password = "password";
// Mail From address
$mailer->From = "tommyo at mydomain.org";
$mailer->FromName = 'Thomas ONeill';
$mailer->Subject = $subject;
$mailer->Body = $body;
$mailer->WordWrap = 50;
$mailer->AddAddress($toemail);
if($mailer->Send()){
//success
}
More information about the talk
mailing list