我試圖從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/ –