Here is something I don't quite understand.

First of all, my site-wide email address configured on Site Information page is [email protected].

Then, I use smtp module to send emails out from my site. I configure SMTP settings with my yahoo email address [email protected].

I tries to send a test email out to my other gmail address [email protected], but failed. Email can never be sent out in this situation.

Here is watchdog log details:

Type    smtp
Date    Monday, September 22, 2014 - 11:29
User    lyon
Location    http://localhost:8888/drupal-test/admin/config/system/smtp
Referrer    http://localhost:8888/drupal-test/admin/config/system/smtp
Message Error sending e-mail from [email protected] to [email protected] : The following From address failed: [email protected]
SMTP server error: From address not verified - see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html

Severity    error
Hostname    ::1

SMTP configuration didn't go wrong, because in the following two situations, email can be sent out well:

  1. configure site-wide email address to be the same one configured in SMTP settings: [email protected].
  2. configure SMTP settings with a gmail address, then configuring site-wide email address to be any email address will work well. (People on Internet says Gmail can override it).

I don't want the SMTP configuration to be tied with Gmail account, it should support any mail host. How can I overcome this problem?

I appreciate your help.

  • Why do you use Yahoo to send Gmail emails in the first place? Any particular reason to do that?
    – Mołot
    Commented Sep 22, 2014 at 6:26
  • I didn't use Yahoo to send Gmail emails. I configured SMTP with my Yahoo account, and was trying to send an email to my Gmail account.
    – lyonsun
    Commented Sep 22, 2014 at 6:30
  • But your "from" address is \@gmail.com not \@ymail.com, so only gmail's SMTP can be expected to send it without problems. In old days with no mail security (199x) you could use any SMTP to send mails with any "from". That is no longer true, people kinda didn't like it when someone was impersonating their clients, and now without SMTP admin's cooperation you cannot do that, you must use SMTP of company that is hosting your "from" address.
    – Mołot
    Commented Sep 22, 2014 at 6:34
  • OK, thank you for this great tips. My question now is that if it is possible to overwrite drupal site-wide email address to be @ymail.com in code programmatically?
    – lyonsun
    Commented Sep 22, 2014 at 6:41
  • or do I have to configure site-wide email address to match smtp_username I put in SMTP configuration page?
    – lyonsun
    Commented Sep 22, 2014 at 6:47

1 Answer 1


I believe the problem lies with Yahoo not having your permission to send from the gmail account. You could try setting up Yahoo to send from your gmail account but I'm not sure Yahoo will do that.

You could look into a mail service like MailJet, which is cheap and scalable.

Or, assuming you're using the drupal_mail function, simply set your $from variable in 'params' to '[email protected]'.

  • thanks for answering my question. MailJet sounds good. But is there any way I could simply override the mail from address to be SMTP from address rather than using site-wide mail address programmatically?
    – lyonsun
    Commented Sep 22, 2014 at 6:27
  • Oh yes, the other option I forgot to write in... does that help?
    – Darvanen
    Commented Sep 22, 2014 at 6:27
  • Yes I am using drupal_mail function. And no, setting $from variable to '[email protected]' didn't work out. I even set $from to be smtp_username variable I configured in smtp module, but still, when I dpm the $from variable in smtp.mail.inc file under smtp module, it keep showing the site-wide email address..
    – lyonsun
    Commented Sep 22, 2014 at 6:37
  • Ok.. Now I got it. You second option works on my own custom module. It was a problem in the test mail function of smtp module. $from is omitted in its drupal_mail function. see line #149 under smtp.admin.inc in smtp module. I will accept your answer, thanks for your time.
    – lyonsun
    Commented Sep 22, 2014 at 7:22
  • Ah right, good sleuthing and you're welcome =)
    – Darvanen
    Commented Sep 22, 2014 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.