Jump to content

PHP email form and Office 365


jeffkunkle

Recommended Posts

Yes, it was working before. Then it stopped working at the beginning of August. I added "connectors" and "safe lists" with Office 365 and message trace shows that the emails are not even making it to Office 365. Our site is hosted with GoDaddy, and everything checked out fine there also. GoDaddy thinks that they were not doing reverse DNS lookups on the sending email address, but started to. When looking at the default email account on GoDaddy (but not on Office 365) there are a ton of "Mail delivery failed. Returning message to sender" messages. Thanks for you help.

Link to comment
Share on other sites

If you want to get that code working, it would be helpful to get those bounceback emails to figure out exactly why they were rejected. Otherwise, the code you have now doesn't support SMTP authentication, you would need to scrap that and find some other code that does. You might want to look at PHPmailer, that should have all the features you need.

Link to comment
Share on other sites

Attached is one of the bounce backs.

To me, it seems that changing the 'From: " in the $headers to my email address and have the SMTP authentication included, it would attempt to send from my email/SMTP/authentication instead of the $email_from address since it can't authenticate that and they are always different, depending on who fills out the form. Thanks,

ReturnedMail.txt

Link to comment
Share on other sites

Yeah, setting the from address to be the person filling out the form is a common red flag, the from address should be associated with the server that is actually sending the message, and you can set the reply-to address to be the person you want to reply to. Many mail servers will refuse to accept or deliver a message if the from address does not match the server actually sending the email. You can thank spammers for ruining that for everyone.Unfortunately, the server sending that bounceback doesn't say if or why the mail was rejected, it just says the recipient address failed. That might mean that the account doesn't exist on that server, or it may mean anything else that they want it to mean. If you want to go forward with SMTP authentication when you send the mail then I would still suggest using PHPMailer for that.

Link to comment
Share on other sites

A follow up, in case anyone else comes across this problem with GoDaddy as the webhost/registar and Office365 as the email host.... the first two calls to GoDaddy they said everything was okay on their end and it was Office365's problem. But the emails were not even making it to Office365. A third call and the helpful tech was able to "set our domain name as remote" so the emails would pass through. Thanks,

Link to comment
Share on other sites

  • 2 months later...

I'm having the same issue, however the host is godaddy, email is office365, but the registrar is someone else. (Long story why everything is separate) My question is this. What does "set domain name to remote" mean? Is this a DNS setting? Any help would be appreciated. Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...