开发者

Sending email from Drupal contact form, but GMail marks it as "Forged"

开发者 https://www.devze.com 2023-02-13 03:23 出处:网络
开发者_StackOverflowMy Drupal site sends email to a GMail account, but the emails sent all go into the Spam folder, and GMail puts up a bar with the message \"This message was likely forged and did no
开发者_StackOverflow

My Drupal site sends email to a GMail account, but the emails sent all go into the Spam folder, and GMail puts up a bar with the message "This message was likely forged and did not originate from your account."

Although I can create a filter to prevent them going to Spam, I want to start sending newsletters, and I suspect they'll have the same problem.

I suspect the problem is with the way I've set up either PHP or Drupal to send mail. As far as I know it's just using the sendmail function. I've set the from address to "info@..." where ... is the site domain. Any tips on how I can make set up my outgoing mail so it won't be refused by GMail (and presumably other major mail providers)?


I suggest this article to get you on the right track. http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html


Here are the steps I followed to get my Drupal emails working. The solution will be different for you depending on which services you're using, but hopefully this will give you a starting point.

  1. In my web host admin area (cpanel), I created an email address for my domain (admin@xxxxx.com).
  2. In my web host admin area (cpanel), I created an email forwarder so that emails sent to this address will be forwarded to my gmail account.
  3. In the settings for my gmail account, under "Accounts and Import", I chose "Add another email address" and added my domain email address. See this link for details on how to do this. This allows my gmail account to send emails using my domain address as an alias.
  4. In Drupal, I installed the SMTP Authentication module. In the configuration for this module, I used the same SMTP information that I used in step 3 to set up my gmail alias.
  5. Now Drupal can send authenticated messages from my gmail account that claim to be from admin@xxxxx.com.
0

精彩评论

暂无评论...
验证码 换一张
取 消