SOLVED: mail function, localhost, & email domain name
Moderator: General Moderators
-
mondsteigen
- Forum Newbie
- Posts: 17
- Joined: Sat Jan 14, 2012 9:59 pm
SOLVED: mail function, localhost, & email domain name
I have a problem with using mail function to send email from localhost. It works only with @gmail.com address. I've tried with @yahoo.com and .me addresses; mails are sent to those addresses (I know this because I don't get the error message) but they don't arrive. How can I solve this problem?
Last edited by mondsteigen on Sun Feb 12, 2012 10:53 am, edited 1 time in total.
Re: mail function, localhost, & email domain name
This is not necessarily true. The mail() function returning TRUE does not mean your MTA successfully delivered the mail. Check your mail server logs.mondsteigen wrote:mails are sent to those addresses (I know this because I don't get the error message)
-
mondsteigen
- Forum Newbie
- Posts: 17
- Joined: Sat Jan 14, 2012 9:59 pm
Re: mail function, localhost, & email domain name
I checked the log. It says
You were right, Celauran. How can I fix this?to=<xxxxxxxx@ymail.com>, relay=mta1.am0.yahoodns.net[66.94.238.147]:25, delay=28684, delays=28690/0.01/0/0.05, dsn=5.0.0, status=bounced (host mta1.am0.yahoodns.net[66.94.238.147] said: 501 Syntax error in parameters or arguments (in reply to MAIL FROM command))
Last edited by mondsteigen on Sun Jan 22, 2012 3:51 pm, edited 1 time in total.
Re: mail function, localhost, & email domain name
The error suggests a malformed 'from' address. Are you adding From headers to the mail() call?
-
mondsteigen
- Forum Newbie
- Posts: 17
- Joined: Sat Jan 14, 2012 9:59 pm
Re: mail function, localhost, & email domain name
Yes. It reads:
This works when I send mails to gmail addresses. Do you think it's a problem with the receiving side? Do I need to config php.ini somehow?
Code: Select all
$headers = 'From: me <me@hushmail.me>';-
mondsteigen
- Forum Newbie
- Posts: 17
- Joined: Sat Jan 14, 2012 9:59 pm
Re: mail function, localhost, & email domain name
This problem is now solved.