If I use the following code without the -f option:
Code:
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
// Send
mail('user@domain.com', 'My Subject', $message);
?>
The email is sent and the mail log outputs the following:
Code:
Jul 2 02:01:55 europa postfix/pickup[28530]: E7383B583C9: uid=30 from=<wwwrun>
Jul 2 02:01:55 europa postfix/cleanup[29251]: E7383B583C9: message-id=<20070702000155.E7383B583C9@europa.mydomain.com>
Jul 2 02:01:56 europa postfix/qmgr[25689]: E7383B583C9: from=<wwwrun@europa.mydomain.com>, size=345, nrcpt=1 (queue active)
Jul 2 02:01:57 europa postfix/smtp[29254]: E7383B583C9: to=<user@gmailcom>, relay=gmail-smtp-in.l.google.com[209.85.129.27]:25, delay=2, delays=0.14/0/1.4/0.4, dsn=2.0.0, status=sent (250 2.0.0 OK 1183334517 g28si14191589fkg)
Jul 2 02:01:57 europa postfix/qmgr[25689]: E7383B583C9: removed
However, if I now attempt sending an email with the -f option:
Code:
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
$returnval = mail('user@domain.com', 'the subject', 'the message', null,
'-f webmaster@domain.com');
?>
No email is sent and nothing gets written to any of the mail logs (messages,mail, mail.err, mail.info, mail.warn). The variable $returnval is empty.
Recent comments
22 hours 1 min ago
1 day 3 hours ago
1 day 7 hours ago
1 day 9 hours ago
1 day 23 hours ago
1 day 23 hours ago
2 days 4 hours ago
2 days 11 hours ago
2 days 12 hours ago
2 days 13 hours ago