2013-01-03 54 views
1

客戶端的網站建立在Rails 3中,並託管在Heroku上,並接受通過Rails郵件發送的表單提交。他們正在收到重複的電子郵件。我無法在我的開發環境中複製該問題。Heroku上的Rails發送重複電子郵件

郵件通過註冊自己的域名與標準Gmail帳戶發送軌郵件:

ActionMailer::Base.smtp_settings = { 
    :address    => "smtp.gmail.com", 
    :port     => 587, 
    :domain    => "clientdomain.com", 
    :user_name   => "[email protected]", 
    :password    => "password", 
    :authentication  => "plain", 
    :enable_starttls_auto => true 
} 

(gather data) 
mail(:to => "[email protected]", :subject => "Form Submittal", :from => @email) 

重複不一定發送瞬間,他們的交貨從1分鐘變化到原來的3小時以上。

在某些情況下,HTML字符被替換爲實體。

下面是一個例子:

From: [email protected] 
> Subject: Form Submittal 
> Date: December 14, 2012 10:38:18 PM EST 
> To: [email protected] 
>=20 
> Form Submittal 
>=20 
> Name: Potential Lead 
>=20 
> Phone: 1234567890 
>=20 
> Email: [email protected] 
>=20 
> Message: Hi my names Some I'm from tennesse and I'd really like to = 
> get info on your service thank you for all your help!!! 
>=20 

和重複的:

> From: [email protected] 
> Subject: Form Submittal 
> Date: December 15, 2012 1:46:54 AM EST 
> To: [email protected] 
>=20 
> Form Submittal 
>=20 
> Name: Potential Lead 
>=20 
> Phone: 1234567890 
>=20 
> Email: [email protected] 
>=20 
> Message: Hi my names Some I%27m from tennesse and I%27d really like = 
> to get info on your service thank you for all your help%21%21%21 
>=20 

我誤以爲只是被提交的表單兩倍,3小時後提交完全相同的輸入但是unlikeliness ,加上大量的蠢事(有時報道60-75%,但從未100%)讓我對此持懷疑態度。

我也發現了哪個指示我重寫默認設置與此重複的問題,要點是:

config.action_mailer.sendmail_settings = { 
    :arguments => '-i' 
} 

...沒有效益。

我的問題,如果不是很明顯:如何阻止rails發送重複的電子郵件?

+0

你有沒有得到任何關於這方面的決議?我似乎有一個類似的問題。 –

+0

我沒有。它仍然經常發送重複的電子郵件,沒有押韻或原因。 –

+0

呵呵我有同樣的問題:( –

回答

相關問題