note 68087 deleted from ref.mail by danbrown

From: Date: Sun, 17 May 2009 20:13:38 +0000
Subject: note 68087 deleted from ref.mail by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155359@lists.php.net to get a copy of this message
Note Submitter: expertphp at gmail dot com ---- For all those having problems sending messages to INBOX (spam-free messages) i recommend using FromHost() function from XPM2's SMTP class. With this function you can set the name of the host that is sending the message. Pay very much attention when using this function, because i recommend the IP address of the host to reflect the MX zone declared for it, and the IP address of the mail sender. A simple example of how to use for sending an e-mail directly to the client: <?php $hostname = 'maildomain.net'; // path to smtp.php file from XPM2 package for inclusion require_once '/path/smtp.php'; $mail = new SMTP; $mail->Delivery('client'); $mail->From('me@'.$hostname, 'My name'); $mail->FromHost($hostname, $havemx); if(!$havemx) die("The hostname: '".$hostname."' doesn't have a valid MX zone!"); $mail->AddTo('client@destination.net'); $mail->Text('It is simple to use XPM2'); $sent = $mail->Send('Hello World!'); echo $sent ? 'Success.' : $mail->result; ?> This is one of the most reliable anti-spam/bulk mail techniques. For more details visit: http://xpertmailer.sourceforge.net/DOCUMENTATION/

« previous php.notes (#155359) next »