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

xjm’s picture

Project: Drupal core » SMTP Authentication Support
Version: 7.12 » 7.x-1.x-dev
Component: contact.module » Code
Priority: Major » Normal

Moving to the correct queue.

spring.oracle’s picture

Marked #1704150: From email address isn't used as duplicate of this issue

spring.oracle’s picture

Marked #1686588: Use From address properly as duplicate of this issue

spring.oracle’s picture

spring.oracle’s picture

I think this is a Sender header issue. See my post: http://drupal.org/node/1686588#comment-6909996

Drakken_Mordith’s picture

Thanks!

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...

SharonD214@aol.com’s picture

Issue summary: View changes

Does 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.

wundo’s picture

Status: Active » Fixed

This is most likely related with you SMTP server FROM address restriction.

I'd suggest trying a different SMTP server.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.