PHP - mail not sending - No errors visible
Posted: Thu Jan 30, 2014 8:38 am
I could really use some help with this.
I have been coding in PHP for about 3 months now, and I've managed to put together some pretty fancy data driven web pages.
In my current work environment, I have never generated any mail messages via PHP.
I have been using Korn Shell and "mailx" for many years.
I have a need to generated email messages inside of my php code.
But, the environment that I'm in requires a mail aliasing entry for each message that I send.
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 SomeAddress@gmail.com
-OR-
echo "Something" | mailx -s"$(echo -e "PHP Test Message\nContent-Type: text/html")" "$DISTRO" -- -f SomeAddress@gmail.com
I never needed to add the "-- -f SomeAddress@gmail.com" 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 have been testing several different PHP mail entries, and I am NOT getting any errors, but the messages are just not being generated, or at least they are not leaving the server.
I am assuming that the issue is with this same exact snippet that I need to end my mailx commands with.
Can anyone tell me, or give me a sample mail command, that would include the above "-- -f SomeAddress@gmail.com" snippet?
Thanks in advance, and have a great day.
JCF
I have been coding in PHP for about 3 months now, and I've managed to put together some pretty fancy data driven web pages.
In my current work environment, I have never generated any mail messages via PHP.
I have been using Korn Shell and "mailx" for many years.
I have a need to generated email messages inside of my php code.
But, the environment that I'm in requires a mail aliasing entry for each message that I send.
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 SomeAddress@gmail.com
-OR-
echo "Something" | mailx -s"$(echo -e "PHP Test Message\nContent-Type: text/html")" "$DISTRO" -- -f SomeAddress@gmail.com
I never needed to add the "-- -f SomeAddress@gmail.com" 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 have been testing several different PHP mail entries, and I am NOT getting any errors, but the messages are just not being generated, or at least they are not leaving the server.
I am assuming that the issue is with this same exact snippet that I need to end my mailx commands with.
Can anyone tell me, or give me a sample mail command, that would include the above "-- -f SomeAddress@gmail.com" snippet?
Thanks in advance, and have a great day.
JCF