I have a very peculiar problem... I have a Ubuntu Server 12.04 with LAMP installed and ssmtp installed and configured properly... Now I can send mails from my terminal with and without sudo. This tells me that my ssmtp configuration is correct.
I can send mail from my php script using:
But, when I replace the toEmail with a variable containing the string of the email, I want to send to, like:
Then in this case the mail is not sent, and instead gmail tells me that I have entered the wrong address... Gmail displays that address as '[email protected]'... While in the first case the address in the email which is received, is received without quotes...
I have searched a lot and I just cant find an answer...
This is the message I receive:
Delivery to the following recipient failed permanently: '[email protected]'