1
我想在我的Rails應用程序中使用Mailgun。如何在郵箱中包含郵件槍API?
當我通過Heroku插件包含它時,顯示錯誤添加信用卡號碼,雖然我想要的免費版本。
我擡起頭,發現這個代碼來自Mailgun。有人能告訴我如何使用它?
require 'mail'
Mail.defaults do
delivery_method :smtp, {
:port => 587,
:address => "smtp.mailgun.org",
:user_name => "",
:password => "",
}
end
mail = Mail.deliver do
to '[email protected]'
from '[email protected]_DOMAIN_NAME'
subject 'Hello'
text_part do
body 'Testing some Mailgun awesomness'
end
end
我試圖用這個,但它會顯示錯誤 - mailgun SSL_read: sslv3 alert bad record mac