By namalik on
Dear Community,
When some one (authenticated user or anonymous user) uses the site wide contact form, I do get the email, however, the email does not include the value entered in the email field (for anonymous user).. It only includes the subject, Name, and the Message. The problem is I cannot contact the anonymous users as I don't get their email address that they entered while submitting the form. Is the a way i can fix it.
Thanks,
-Nabil.
Comments
This problem is from your hosting company.
Many web hosting companies do not allow 'nobody' emails and in return either replace the email field with the server root email address or just leave it blank. This they say is to stop spaming.
Change your hosting company or talk to your hosting company.
Best of Luck
Ron
I'm using gmail for smtp and
I'm using gmail for smtp and all my domain email. I don't think it's a host issue, since the smtp modules I listed connects to gmail to send the messages.
I need a solution to print / display the email address in the body of the message & I don't know anything about the contact module or the email system in drupal.
thanks
Correct , that is the
Correct , that is the problem.. The email received does not include the email address of the anonymous user that he/she entered in the site-wide contact form before submitting the form.
May be my message was not
May be my message was not clear!
I am getting the emails, however, i want the the contact module to include in the email body (of the email that I receive) the email address entered by the anonymous user in the form before submitting the form. This will enable me to contact back the anonymous user.
I'm getting the same problem,
I'm getting the same problem, when someone enters their e-mail in the contact form and when I recieves that e-mail. It does not includes the contact sender's e-mail address.
Kinda defeat the purpose of them entering their e-mail...
Well see if this helps
Hello
I had this nasty problem. and I found that the module "htmlmail" was creating problem. I uninstalled it and everything was okay. Though it was difficult but I uninstalled all modules and kept checking by enabling few modules each step. Try it out this could help.
Ron
I uninstall "Messaging
I uninstall "Messaging PHPMailer" which seem like the only thing that have to do html mail.
"Mail Sending Method: Integration with PHPMailer for HMTL Mail"
Though that doesn't seem to help.
Same problem.
I don't have htmlmail installed - and I am using SMTP settings to send emails via GMAIL.
The email is received with the sender's name but the email address is not received.
Any pointers would help.
Override the core module
This is such a basic piece of core code that it should've been addressed by now.
My solution for now is: Edit the file /modules/contact/contact.module
Change the line under the function contact_mail()
From:
$message['body'][] = t("!name sent a message using the contact form at !form.", array('!name' => $params['name'], '!form' => url($_GET['q'], array('absolute' => TRUE, 'language' => $language))), $language->language);
To:
$message['body'][] = t("!name (!mail) sent a message using the contact form at !form.", array('!name' => $params['name'], '!mail' => $params['mail'], '!form' => url($_GET['q'], array('absolute' => TRUE, 'language' => $language))), $language->language);
That's it !!!
Email addresses will appear now.
-Anil
Thanks!
This is a life saver... I was going to try reinstall my test site from sketch to try fix this issue.
Yes, I agree, this really should be addressed. While it is simple it is unnecessarily complicated to fix.
New issue?
Has anybody submitted a new issue about this?
I think it is because of Gmail Security Policy
Earlier, i had hosted my website on my local machine, and i was using gmail smtp for sending email messages. The contact form contacts the gmail smtp to send email, but requests that the from address has the email address that was entered in the contact form itself. Now, gmail does not allow this, and forces to used the email address/user account that was used to authenticate during smtp communication. In the end, the email reaches the destination, however, the from header is the gmail user name/email that was used for authentication between my local smtp and gmail smtp.
Well, later on, when if relocate my site from my local machine to a hosting provide that had its own email system (smtp), the emails sent through the contact form are working fine. All email received have the email address of the user that filled the form and his email address in the form.
Good Luck.