amro / uakari

An API wrapper for the MailChimp STS API (1.0)
MIT License
20 stars 5 forks source link

ActionMailer silently failing? #15

Closed kbighorse closed 12 years ago

kbighorse commented 12 years ago

Followed what little there was in the README to set up ActionMailer. I call my Mailer method and get a return value, but no email is received. Is there an example that might show what I'm missing? Might also be nice to add some more error notifications. When I tried sending directly (not with AM), got a helpful AWS error (which I addressed), but there is no such error when sending through AM.

ruby-1.9.2-p180 :019 > UserMailer.test.deliver!
 => #<Mail::Message:2227722800, Multipart: false, Headers: <From: "Syfto Shopping" <deals@syfto.com>>, <To: kbighorse@gmail.com>, <Subject: testing>, <Mime-Version: 1.0>, <Content-Type: text/plain>, <X-SMTPAPI: {"filters": {}}>> 

config/development.rb:


  config.action_mailer.delivery_method = :uakari
  config.action_mailer.uakari_settings = {
    :api_key      => "XXXXXXXXXX",
    :track_clicks => true,
    :track_opens  => true, 
    # :from_name    => "Change Me"
    # :tags         => ["awesome", "tags", "here"] #optional STS tags
  }
  config.action_mailer.default_url_options = { :host => "localhost:3000" }

Sending directly through uakari or with Gmail smtp settings works.

amro commented 12 years ago

I'm able to send just fine with settings similar to yours (text/plain, no from name) so I'm not sure what the problem could be, unless you happen to be on some version other than the latest (0.2.8). Unfortunately, there was a bad release (0.2.7), which I pulled from rubygems.

Is anything different (email you're sending from or to) between sending with Uakari vs. Uakari's ActionMailer handler? I ask because, IIRC, SES has limitations on what emails you can send from/to until you validate them.

I'll make Uakari optionally raise errors in the next release and get some testing in as well.

kbighorse commented 12 years ago

You were right, it was the SES limitations. Thank you!