Anyone having problems with sending contact emails? #542
-
contact form uses senders email address as "from", which confuses dmarc filters...i.e: yahoo rejects mail not sent from its own domain, so anyone sending a contact form with yahoo address is rejected, possibly microsoft and gmail would go to spam due to their respective DMARC policies yahoo: v=DMARC1; p=reject; pct=100; rua=mailto:dmarc_y_rua@yahoo.com; so customer comes to example.com website, fills the contact form with customer@yahoo.com and yahoos DMARC check fails because email is originating from example.com and not yahoo.com... therefore - email is rejected is best practice to use own address as "from"? $mailTo = mb_encode_mimeheader("$author")." <$email>"; |
Beta Was this translation helpful? Give feedback.
Replies: 15 comments 8 replies
-
...not all email clients may respect the Reply-To field when we actually click "Reply" |
Beta Was this translation helpful? Give feedback.
-
From RFC 5322 therefore... $mailTo = mb_encode_mimeheader("$author")." <$email>"; may be the most politicaly correct version, and should work for the majority of mail clients UPDATE... |
Beta Was this translation helpful? Give feedback.
-
further to the above... yellow v 7.6 / contact v 7.3 sends fine with yahoo address |
Beta Was this translation helpful? Give feedback.
-
Let me guess... your webmaster email address is your yahoo address? If this is true, then the problem is your webmaster email address and you can try the following:
Let us know what you find out, hope this helps. |
Beta Was this translation helpful? Give feedback.
-
@markseu hi mark, thanks for taking the time to respond.
my reasoning suggests there is something in the contact form which is contributing to the email rejection, or moreover something that could be further optimised. Yahoo has made bold use of DMARC rejection, as has microsoft, and even gmail "pushed the envelope" for a while. in the case of the contact form - the mail of course does not originate from yahoo... the mail is originating through a private domain bear in mind this is one visitor to the site who happens to have a yahoo address ~ therefore every visitor using yahoo email will fail |
Beta Was this translation helpful? Give feedback.
-
I recommend to configure a webmaster email address that matches the domain name of your website and to not forward emails across domain names. As long as you keep emails inside your own infrastructure, there shouldn't be any problems at all. Even if you're sending emails outside of your own infrastructure, there shouldn't be many problems. Here are some explanations with technical details. Let's assume you configure a webmaster email address that doesn't match the domain name of your website, then emails might be transferred to another email server, which might apply filters to reject incoming emails. Let's assume you configure your webmaster email address to be forwarded across domain names, for example to Gmail or Yahoo, then emails will be first accepted by your own mail server, so far so good, but later transferred to another email server and pretty much the same problem arises. Once emails leave your own infrastructure, things get more complicated and mail filtering rules become more aggressive. Policies like those from Yahoos break traditional email forwarding. They must have been really desperate when they introduced these policies and the responses at the time were not positive. In theory you could use headers to convince your MTA/MUA that you're sending emails in behalf of someone else. The approach we are using is not pretending to be sending emails as someone else. We are sending emails as ourselves and then state inside the email that we have a contact message from someone else. Hope this design works better in practice. Tested with Datenstrom Yellow 0.8.20. Edit 2020-09-04: Updated recommended setup and added technical details. Edit 2022-05-17: Updated recommended setup and explained current approach. |
Beta Was this translation helpful? Give feedback.
-
@markseu the webmaster is a private domain further information...
the above overrides the system.ini webmaster email when an author and email are set on the contact page author and email are set in the contact page. Authors email is a gmail address The problem exists when author is using a gmail address and the visitor is using yahoo ''' the way it was originally set is technically correct - however a visitor using yahoo is the sender of the mail on another domain therefore it is unauthenticated, and it is rejected by yahoo's DKIM / SPF / DMARC policies There is no way to keep it technically correct and solve the problem... however the problem exists, and it will continue to affect yellow users. drupal have an implementation to change any 'from' email to a root domain -no-reply email. |
Beta Was this translation helpful? Give feedback.
-
Have you tried to set an email that matches the domain name of your website? |
Beta Was this translation helpful? Give feedback.
-
I have tried 19 hours worth of experiments to diagnose and find a way past it, as i have customers losing business, and bounce emails backing up. in the case quoted...
yahoo suggests
again - while this is not technically correct as per RFC, from a technical standpoint - the way the contact form is setup is correct. |
Beta Was this translation helpful? Give feedback.
-
Have you tried to not forward emails -or- only to an email that matches the domain name of your website? |
Beta Was this translation helpful? Give feedback.
-
yes, and in one word - deliverability i live in the country. If i use a webform to write a letter, and it can not go anywhere because i have signed the letter (a signature someone doesnt like) and put my return address on it, the mailman can not pick up the letter, the letter can not get to sweden, mark can not get the letter and the entire system is broken. for this webform - we are only talking about the signature on the letter and the return address. all yahoo/microsoft/gmail is saying is that we cant use their pen to write the letter, and we cant say we are sending the letter through their post office (unless we are)- thats all fair enough. essentially - a visitor to a website/webform is using the (domains) pen to write a letter and they put their own reply address on it... the rest should be automatic and gauranteed - the letter should be delivered no matter what colour the mailbox is, who the mailman is, what brand of mail-car the mail man drives, or what language the post office speaks. {spam excepted} |
Beta Was this translation helpful? Give feedback.
-
When you are sending email using mail() function in PHP, the mail is sent from your web server. Sometimes it may cause issues on sending an email and fails to deliver mail to the recipient. When you send an email via SMTP, email is sent from the mail server rather than the web server. according to the guy that made swiftmail...
therefore in order to fix the non-deliverability / non-forwardability of the contact form...
and considering the last options require modifications to the server, you would need one of the first two. ref: |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
The contact extension has been updated with new headers for SPF. Hopefully this will work better in some setups. |
Beta Was this translation helpful? Give feedback.
-
as per #542 (comment) above... possibly the reason The folowing may work but is untested...
and the relevant RFC...
|
Beta Was this translation helpful? Give feedback.
When you are sending email using mail() function in PHP, the mail is sent from your web server. Sometimes it may cause issues on sending an email and fails to deliver mail to the recipient. When you send an email via SMTP, email is sent from the mail server rather than the web server.
according to the guy that made swiftmail...