Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I enabled ajax on my webform setting page, the email that is send after you complete the webform, isn't always send.
It gives no errors, also in the watchdog says the email is send succesful. But it isn't.
Does anyone know how this is possible?
Comment | File | Size | Author |
---|---|---|---|
#13 | 2992209-13.patch | 3.33 KB | jrockowitz |
| |||
#10 | 2992209-11.patch | 1.17 KB | jrockowitz |
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedAre you using any email handling modules?
Is the email sent with Ajax off?
Are any errors being logged in your browsers JavaScript console?
Are you able to replicate this issue using the default contact form?
Comment #3
Dennis Cohn CreditAttribution: Dennis Cohn at ezCompany commentedAre you using any email handling modules?
No, do I need something like swiftmailer?
Is the email sent with Ajax off?
Yes
Are any errors being logged in your browsers JavaScript console?
No, also no errors in the logs.
Are you able to replicate this issue using the default contact form?
We don't have the contact form enabled.
Comment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedMy steps attempting to reproduce this issue using the default 'Contact' webform.
Does your "Recent log messages" contain a record saying "Sending mail to: someone@gmail.com"?
Comment #5
Dennis Cohn CreditAttribution: Dennis Cohn at ezCompany commentedWell I'm using the contact form I see and in the logs I see: "Contact webform sent Email notification email" after testing the form.
I tried to fill in the form on 6 different pages and I got different results.
Sometimes, 5 of the 6 emails are received... sometimes 3 of 4.
While the logs says: "Contact webform sent Email notification email."
The only time it works all the time is when I enable "Inline (reloads the current page and replaces the webform with the confirmation message)" as comformation type.
Can It be the hosting?
Comment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedAre you submitting the form as an anonymous or authenticated user?
If you are consistently seeing the sent message in watchdog but then not receiving the email, I am willing to say that the problem is not the Webform module.
Have you tried using a different SMTP server? I am using gmail.
Comment #7
Dennis Cohn CreditAttribution: Dennis Cohn at ezCompany commentedI'm testing the form as an anonymous and authenticated user but the result is the same.
It's so strange... no errors, nothing. I'm kinda lost :)
Haven't tried it with an other SMTP server..
Comment #8
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@Dennis Cohn Is anything being logged in the browser's JS console. When Ajax fails there should always be something logged in the browser's JS console.
A Gmail SMTP server is really easy to setup.
Comment #9
Dennis Cohn CreditAttribution: Dennis Cohn commentedAfter some testing and contacting the webhosting to dug into some mail logs they found out that the mails were being blocked by the spamfilter and therefor not being delivered.
They send me this example.
or
So it's not a bug I think?
Well I think there should be a nice default html template which has got the right mail headers for none technical people.. :)
Comment #10
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedWould the solution be as simple as adding basic
<html>
tags to webform-email-message-html.html.twig?The attached patch applies a full HTML table to the message. This patch is going to break a few tests but you should be able to test it.
Comment #11
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #13
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #15
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI committed the patch. Please download the latest dev release to review.