Pony yandex.ru and mail.ru specifics

霸气de小男生 提交于 2019-12-08 19:41:29

This code works for yandex.ru (and you need to go here https://mail.yandex.ru/neo2/#setup/client and allow everything):

post '/sent' do
  Pony.mail(
    :to => "_yourEmail_@yandex.ru",
    :from => "_sameYourEmail_@yandex.ru",

    :via => :smtp,
    :via_options => { 
      :address              => 'smtp.yandex.ru', 
      :port                 => '25', 
      :enable_starttls_auto => true, 
      :user_name            => '_yourUsername_', 
      :password             => '_yourPassword_', 
      :authentication       => :plain
    })
end

And same code works for mail.ru (and generally you don't need to do anything else).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!