January 30th, 2014, 10:03 AM
PHP - mail not sending - No errors visible
Using "mailx", I would send a simple mail message using the following syntax:
cat $FILE | mailx -s"$(echo -e "PHP Test Message\nContent-Type: text/html")" "$DISTRO" -- -f <email address>
echo "Something" | mailx -s"$(echo -e "PHP Test Message\nContent-Type: text/html")" "$DISTRO" -- -f <email address>
I never needed to add the "-- -f <email address>" until coming to this particular company.
But, if I do NOT add this snippet to the end of my mailx command, the messages will never leave the server.
I've checked various different sources, but have not found any documentation that pertains to this particular snippet: "-- -f <email address>"
Can anyone expand on this particular snippet, and tell me exactly what it means?
The reason I need to know, is because I am now developing a series of PHP pages, and I need to generate messages from my PHP code.
I am currently having the exact same symptoms using PHP on my current working servers, that I would have using mailx, if I did not include the above code snippet.
I'm trying to ultimately determine the corresponding PHP mail syntax needed, to include the same snippet as listed above.
Thanks in advance, and have a great day.