PHP mail settings

I have godaddy VPS. Its windows server with plesk. Two websites are hosted. for one of them email function works for the other one it gives 503 error, smtp authentication, This mail server requires authentication when attempting to send to a non-local e-mail address.
dreamer123456Asked:
Who is Participating?
 
Scott Fell, EE MVEConnect With a Mentor Developer & EE ModeratorCommented:
In plesk, go to Tools Settings > Mail Server settings.  On mine it is  https://domain.com:8443/plesk/server/mail/

There you will see the relay restrictions are  probably on,and you can add IP's, "Use no relay restrictions for the following networks:"
0
 
arnoldConnect With a Mentor Commented:
Commonly, the php.ini defines the mail handling, when hosting different site, the mail handling becomes more difficult
Your options are either install iis SMTP component if not installed already and use the local to handle the delivery.
Alternatively, if each domain has to send through their respective provider and thus use an SMTP session to the specified host..
The 503 means an internal failure such that looking through the log, or including debug/logging of errors that you can refer back to in order to identify what the cause for the error is.

The auth requirement is in place to avoid/prevent server from being misused as a spam distributor.

Php includes process that deals with SMTP auth.
If using local, there is a configuration dealing with relaying that you can authorize relaying to any recipient.
0
 
Scott Fell, EE MVEConnect With a Mentor Developer & EE ModeratorCommented:
Do you have email turned on for the other domain?  It should just work. If you have to use authentication, then you can't use the base mail function http://php.net/manual/en/function.mail.php because it does not support authentication.

I have stopped using the server to send out email a long time ago and have used either sendgrid or mandrill.
0
 
dreamer123456Author Commented:
I created a mailbox for my domain since it was not allowing email to non-local account. I set up mail forwarding from that email. This works but no other solution worked.
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.