I was tracking down where watchdog table mail messages get missing. In Drupal, the messages seem to have sent successfully, however no messages are ever received.
I noticed that the person made a typo in the domain name of their return address: Switched a couple of letters around. Fortunately the watchdog entry showed the email addy they typed in.
I checked with our hosting provider, and their mail system discards any emails coming from an invalid reply domain. They suggested the following be done in Drupal:
Any emails coming from none existing domain names will not be delivered to your mailbox as the system will check the mail records of that domain. If the domain does not exist then it does not have a mail record. Since you cannot control the typo errors of your site visitors what you can do is to modify your form. Make sure that the email address entered in the form is not used as the sender when the form is sent to you.
Since this is the case, then Drupal should be also verifying the same way, else messages appear to have successfully sent, but the messages are never actually received.
Since I have many installations of D6, opening the bug against D6 rather than the newest version of Drupal this problem exists with.
Comments
Comment #1
dave reidI don't believe this can be done in a 100% reliable way and I don't really know of any other site that I use that does this type of checking. It's up to the user to type in e-mail addresses correctly.
Comment #2
mdlueck commentedWhy can not Drupal code do the same sort of look-up that email servers are capable of doing to validate the address domain name? I believe there is already logic in the contact mod to turn a bad field red, display an error... so would be just one more check to add to the list of tests run.