By Mike_Waters on
My site's default contact form does not include the sender's email address (which is a required field) in the notification email; I can however access the sender's email address in the site log (type=mail; 'Joe sent an email regarding...' ).
Is my SMTP server to blame, or is this expected behavior?
Comments
Drupal contact form breaks if Gmail is the SMTP server
The drupal site-wide contact form uses SMTP trickery :0) to make it appear that the contact email is actually from the contact-er by [ab]using the 'MAIL FROM' SMTP command.
This will be a problem for users of Gmail (including Google apps corporate email services) as it does not support this and will overwrite any specified 'MAIL FROM:' address with the address of the account used to send the mail.
Drupal does not include the sender's email address in the message text, and so do the recipient has no way of knowing it.
This doesn't seem like a 'bug' per se so I won't file it as one.
An easy fix for users with this problem is to modify contact.module directly:
(contact.module v 1.74 2007/01/10 15:17:51 line 512)
- $message[] = t("!name sent a message using the contact form at !form.", array('!name' => $form_values['name'], '!form' => url($_GET['q'], NULL, NULL, TRUE)));
+ $message[] = t("!name (!mail) sent a message using the contact form at !form.", array('!name' => $form_values['name'], '!mail' => $form_values['mail'], '!form' => url($_GET['q'], NULL, NULL, TRUE)));
And like I said before, the site log (entry type==mail) will show the email address of the contact-er.
Drupal.org search seems to be down right now (and the site is on-and-off), so please forgive me if this is a known issue.