Send email from non system email address using Drupal API From what should be a non-trivial task, I find this very confusing. My requirement is to send HTML email upon webform submission. Here is what I have now.

If from address is set as domain email address (info@domain.com) that is set as system's email address, set via Admin >> Configuration >> System, the email was sent as non HTML email. This is strange, because I dpm the email content before executing drupal_mail, and it shows up as properly formatted HTML. I could tolerate this for now. Here comes the trivial part.

If from address is set as non-domain email address, such as info.domain@gmail.com, the email sent, never reached the recipients, but is logged as sent (I use mail_logger module) under appropriate email key. I have checked spam folder but it is not there either.

My question is, does drupal 7 require the from email address to be that of the same domain or set as system email? (I would have expect a failed message and is logged into mail_logger)

Any suggestions would help.
This happens becouse Gmail seems to block these messages as they are often used for spoofing. Using the SMTP mailer plugin https://www.drupal.org/project/smtp and authenticating using your info.domain@gmail.com should solve the problem.