note 68087 added to ref.mail
| From: | expertphp at gmail dot com | Date: | Wed, 12 Jul 2006 17:05:56 +0000 |
| Subject: | note 68087 added to ref.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-114708@lists.php.net to get a copy of this message | ||
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/
----
Server IP: 64.71.164.2
Probable Submitter: 86.34.8.108
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/ref.mail.php
Edit -- http://master.php.net/note/edit/68087
Del: integrated -- http://master.php.net/note/delete/68087/integrated
Del: useless -- http://master.php.net/note/delete/68087/useless
Del: bad code -- http://master.php.net/note/delete/68087/bad+code
Del: spam -- http://master.php.net/note/delete/68087/spam
Del: non-english -- http://master.php.net/note/delete/68087/non-english
Del: in docs -- http://master.php.net/note/delete/68087/in+docs
Del: other reasons-- http://master.php.net/note/delete/68087
Reject -- http://master.php.net/note/reject/68087
Search -- http://master.php.net/manage/user-notes.php