我尝试使用rails应用程序测试架构集成。我使用个人Gmail帐户配置SMTP:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'gmail.com',
user_name: 'XXXX@gmail.com',
password: 'XXXX',
authentication: 'plain',
enable_starttls_auto: true
}
我测试将它发送到我自己的帐户。但它似乎不起作用..
我使用以下示例代码进行测试:
PS:邮件通过验证
谢谢
编辑:我邮件的标题
Return-Path: <XXX@gmail.com>
Received: from gmail.com (84-74-24-22.dclient.hispeed.ch. [84.74.24.22])
by mx.google.com with ESMTPSA id m8sm9364668eeg.11.2014.04.23.13.34.35
for <XXX@gmail.com>
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Wed, 23 Apr 2014 13:34:35 -0700 (PDT)
Date: Wed, 23 Apr 2014 22:34:34 +0200
From: XXX@gmail.com
To: XXX@gmail.com
Message-ID: <535823da92e7c_3d223ffc2442dbe093598@WS-39.local.mail>
Subject: =?UTF-8?Q?Merci_d'avoir_command=C3=A9_!?=
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_535823da916a1_3d223ffc2442dbe0934a9";
charset=UTF-8
Content-Transfer-Encoding: 7bit