Using Amazon SES with Rails ActionMailer

前端 未结 10 1357
南旧
南旧 2020-12-04 09:42

What would be the best way to go about making ActionMailer send mail via Amazon SES in Rails 3?

Edit:

This is now a gem:

gem install amazon-         


        
相关标签:
10条回答
  • 2020-12-04 09:51

    using :sendmail, I managed to get all emails to send running apt-get install postfix as root on my AWS machine and using all the default answers.

    0 讨论(0)
  • 2020-12-04 09:54

    SES just was released into beta today, so I doubt that there is a ready-to-go gem (at least, not that I've seen). You could write a custom module based upon their developer documents:

    http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/
    
    0 讨论(0)
  • 2020-12-04 09:57

    You can provide delivery method to action mailer in your environment.

    config.action_mailer.delivery_method = AmazonSES.deliver
    

    For now you are likely on your own writing the delivery code.

    0 讨论(0)
  • 2020-12-04 09:58

    I created a simple Rails / SES API gem that uses Signature v4 to sign the request. This is best used for transactional emails such as contact us, user registration, etc.

    Rails SES API integration gem

    Please feel free to improve on it & contribute.

    0 讨论(0)
  • 2020-12-04 10:03

    I also have a gem out that supports sending e-mail through SES from Rails 3:

    https://github.com/drewblas/aws-ses

    It also has all the API for verifying/managing e-mail addresses

    0 讨论(0)
  • 2020-12-04 10:04

    After poking around a bit I ended up just making a simple class to do this.

    https://github.com/abronte/Amazon-SES-Mailer

    In rails, you can get the encoded email message:

    m = UserMailer.welcome.encoded
    AmazonSES.new.deliver(m)
    
    0 讨论(0)
提交回复
热议问题