开发者

How do I send signed emails from ActionMailer?

开发者 https://www.devze.com 2022-12-27 12:31 出处:网络
I\'m using GMail as my SMTP server. I have that configuration working just fine: # config/initializers/action_mailer.rb:

I'm using GMail as my SMTP server. I have that configuration working just fine:

# config/initializers/action_mailer.rb:
ActionMailer::Base.smtp_settings = {
  :tls            => true,
  :address        => "smtp.gmail.com",
  :port           => "587",
  :d开发者_如何学运维omain         => "www.example.org",
  :authentication => :login,
  :user_name      => "admin@example.org",
  :password       => "it's a secret"
}

I also have a public/private RSA key pair in config/ssl/rsa.public and config/ssl/rsa.private.

What do I do to sign the emails before shipping them off to GMail's SMTP server?


I think you want ActionmailerX509. You need a certificate which you can a) buy for lots of money b) get for free from CAcert.org c) generate yourself. Everything you need to know is explained in the README.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号