I'm trying to use the contact module of drupal but when I do a test email is not sent and it gives the following error:
Error sending e-mail from test@gmail.com to webmaster@yourdomain.com : SMTP Error: The following recipients failed: webmaster@yourdomain.com
SMTP server error: "Your IP: XX.XX.XX.XXX : Your domain gmail.com is not allowed in header 550 From"
I use the SMTP Authentication Support module (it is work) to use the mail server that I want, but it seems my server does not support in the field from an email with a domain wicht is not contained in it (for security policies).
I have temporarily solved the problem by changing in the file modules/contact/contact.pages.inc line:
$from = $values['sender']->mail;
for this one:
$from = "youraccount@yourdomain.com";
Comments
Comment #1
xjmMoving to the correct queue.
Comment #2
spring.oracle commentedMarked #1704150: From email address isn't used as duplicate of this issue
Comment #3
spring.oracle commentedMarked #1686588: Use From address properly as duplicate of this issue
Comment #4
spring.oracle commentedMarked #1597758: SMTP is returning errors when attempting to connect to Amazon SES as duplicate of this issue
Comment #5
spring.oracle commentedI think this is a Sender header issue. See my post: http://drupal.org/node/1686588#comment-6909996
Comment #6
Drakken_Mordith commentedThanks!
The installation / documentation I think, really needs to have some mention about this.
I struggled for days on and off with getting this to work.
Having done enough reading and research on it:
1. I think most people setting up the 'Contact Form' the first time in Drupal, expect it to work out of the box for more than 'site wide' contact only.
2. Failing that; installing the SMTP module and inputting legitimate value should allow users to send messages. That's the point whether they're authenticated site users, or anon, for most I think.
3. Finally being stuck trying to figure out if it is the SMTP server settings, Drupal, or SMTP Authentication module.
If it is a security concern, then please add a note or setting so people understand why this is such, and possibly offer a means to work around it or be aware of it and the consequences.
Thanks intropedro for the info...
Comment #7
SharonD214@aol.com commentedDoes anyone have a fix for this? I can only get it work when putting in the sitewide email in the from address. That sort of defeats the point of the from field if you can't respond to the sender.
Comment #8
wundo commentedThis is most likely related with you SMTP server FROM address restriction.
I'd suggest trying a different SMTP server.