note 70749 added to function.mail
| From: | tdaniel at univ dot haifa dot ac dot il | Date: | Thu, 26 Oct 2006 11:17:15 +0000 |
| Subject: | note 70749 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119134@lists.php.net to get a copy of this message | ||
I had trouble getting multiple emails sent for Outlook accounts (a single PHP page performed 2
mail() calls).
The PHP mail() function works correctly, but the same mails that were recieved on a private POP3
server were randomly missing by our intranet Outlook exchange server.
If you have the same problem, try to verify that the "Message-ID: " is unique at the
$headers string. i.e.
<?php
$headers = [...] .
"Message-ID: <". time() .rand(1,1000).
"@".$_SERVER['SERVER_NAME'].">". "\r\n" [...];
?>
(rand() is used only for demonstration purposes. a better way is to use an index variable that
increments (i++) after each mail)
I noticed that when multiple messeges were sent simultaneously, the message-id was the same
(probably there was no miliseconds differential). My guess is that Outlook is collating messages
with the same message-ID; a thing that causes only one email to pass to the Outlook inbox instead of
a few.
----
Server IP: 216.194.113.175
Probable Submitter: 132.74.99.84 (proxied: 132.74.7.65)
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- https://master.php.net/note/edit/70749
Del: integrated -- https://master.php.net/note/delete/70749/integrated
Del: useless -- https://master.php.net/note/delete/70749/useless
Del: bad code -- https://master.php.net/note/delete/70749/bad+code
Del: spam -- https://master.php.net/note/delete/70749/spam
Del: non-english -- https://master.php.net/note/delete/70749/non-english
Del: in docs -- https://master.php.net/note/delete/70749/in+docs
Del: other reasons-- https://master.php.net/note/delete/70749
Reject -- https://master.php.net/note/reject/70749
Search -- https://master.php.net/manage/user-notes.php