我试图从rails发送邮件并使用thunderbird捕获它。如何发送本地主机电子邮件并使用Thunderbird进行捕获?
这是我的邮件:
def hello_world
from = '[email protected]'
subject = 'Hello World'
to = '[email protected]'
main to: to, from: from, subject: subject
end
我跟着这个指令在本地配置的Thunderbird,它是工作的罚款。 https://gist.github.com/raelgc/6031274
我不知道如何配置rails。
我应该在development.rb中放置什么?
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "localhost",
:port => 25,
:domain => "localhost"
}
是的,你应该把它放在development.rb虽然它必须是雷鸟?试试这个https://mailcatcher.me/ –