note 77212 added to ref.mail
| From: | contact at xpertmailer dot com | Date: | Mon, 20 Aug 2007 14:17:56 +0000 |
| Subject: | note 77212 added to ref.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129641@lists.php.net to get a copy of this message | ||
SMTP servers are configured to block mails for a period afther a certain number of received mails
(based on IP address), to protect from spammers. Now, you can avoid this problem by connecting to
internet with another IP afther a number of sent mails. To do this, you must create context
connection:
<?php
// path to 'MAIL.php' file from XPM4 package
require_once '/path/MAIL.php';
$m = new MAIL; // initialize MAIL class
// set option "bindto" IP_ADDRESS:PORT
// more info: http://www.php.net/stream_context_create
$o = array('socket' => array('bindto' => '192.168.0.100:0'));
$m->Context($o); // set context connection
$m->From('me@myaddress.net', 'My Name');
$m->AddTo('client@destination.net', 'Client Name');
$m->Subject('Hello World!');
$m->Text('Text version of message.');
// send mail directly to client SMTP server
echo $m->Send('client') ? 'Mail sent !' : 'Error !';
print_r($m->History); // print History for debugging
?>
To use an IP address other than default, you must have configured properly your IP addresses list.
For more options and informations visit http://www.xpertmailer.com .
----
Server IP: 69.147.83.197
Probable Submitter: 82.79.234.233
----
Manual Page -- http://www.php.net/manual/en/ref.mail.php
Edit -- https://master.php.net/note/edit/77212
Del: integrated -- https://master.php.net/note/delete/77212/integrated
Del: useless -- https://master.php.net/note/delete/77212/useless
Del: bad code -- https://master.php.net/note/delete/77212/bad+code
Del: spam -- https://master.php.net/note/delete/77212/spam
Del: non-english -- https://master.php.net/note/delete/77212/non-english
Del: in docs -- https://master.php.net/note/delete/77212/in+docs
Del: other reasons-- https://master.php.net/note/delete/77212
Reject -- https://master.php.net/note/reject/77212
Search -- https://master.php.net/manage/user-notes.php