I am sending email through the Mandrill gateway.

Site Default Email (on Site Information page): abc@xyz.com

"E-mail from address" on the SMTP configuration page: abc@example.com

When I send a test email, I see no error, but when I log into Mandrill and check the outbound emails, I saw that Mandrill rejected the email because it was sent by xyz.com, which it should have been sent by example.com.

As a workaround, you can change the Site Default Email to match the "Email from address."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ptmkenny created an issue. See original summary.

estoyausente’s picture

I did a simple replace form site_mail to configured from mail (if is empty, we use site_mail instead)

asrob’s picture

Status: Needs review » Needs work

I changed "E-mail form address" to another one that different than site email but it didn't work.

asrob’s picture

Priority: Normal » Major

Changing priority because this form item are unusable.

kashandarash’s picture

pazhyn’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: 2659748-5-email-from-address-is-not-used.patch, failed testing.

The last submitted patch, 5: 2659748-5-email-from-address-is-not-used.patch, failed testing.

kashandarash’s picture

Status: Needs review » Needs work

The last submitted patch, 9: email_from_address_is_not_used-2659748-9.patch, failed testing.

The last submitted patch, 9: email_from_address_is_not_used-2659748-9.patch, failed testing.

kashandarash’s picture

pazhyn’s picture

Return-Path and Sender headers are also using From field in SMTP module settings now.

dpovshed’s picture

Status: Needs review » Needs work

@pazhyn, the patch from #13 looks simple and efficient, thank you!

There are only 2 minor codestyle glitches which I propose to correct:

1) line 93:
// Set SMTP module email from

2) if you removing double empty lines at ##113, 114, would be nice to remove one at lines 104, 105 as well.

Except these 2 cosmetic issues nothing wrong found. Code was also manually tested.

pazhyn’s picture

@dpovshed, thank you for corrections.

pazhyn’s picture

Issue tags: +DrupalCamp Kyiv
pazhyn’s picture

Issue tags: +CodeSprintUA
pazhyn’s picture

Assigned: Unassigned » pazhyn
dpovshed’s picture

Status: Needs review » Reviewed & tested by the community

#15 looks great, good to go!

Anonymous’s picture

#15 worked for me also.

wundo’s picture

Priority: Major » Critical
wundo’s picture

  • wundo committed 631cc98 on 8.x-1.x authored by pazhyn
    Issue #2659748 by kashandarash, pazhyn, estoyausente, asrob, ptmkenny,...
wundo’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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