I have a Rails 3.2 app running on Heroku using Action Mailer and Sendgrid to send single transactional emails. Currently when the app sends an email, the request doesn't get received by Sendgrid to send out for 11 minutes. When viewing the received email in the inbox, the time will read the time it was received, but if you open up the email, it has the time (11 minutes prior) that the email request was originally generated. This is what I have in production.rb:
ActionMailer::Base.smtp_settings = {
:address => 'smtp.sendgrid.net',
:port => '587',
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'heroku.com',
:enable_starttls_auto => true
}
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
I've never encountered this problem with Rails 4.0 apps, so is this a known issue with Rails 3.2?
SendGrid takes 0 to 603.03 seconds to deliver each message.
Once you create a sender identity a, you can send 100 emails per day. If you need to send more than that, complete your account setup to upgrade to a paid plan!
1. Processed. This event fires when SendGrid receives an individual message and prepares it to be delivered. Think of this as the top of the funnel-unless it is dropped (see below), each message you push to SendGrid will create a processed event.
I've had this also.
After talking with their support, its an intentional delay, put into the system on new accounts.
Their system needs to 'learn' that you are not a spammer before it will remove the delay.
They said it should only be delaying for 'a short period of time', and there is no other way to remove it, other than just send legitimate emails, and wait.
Some answers from the SendGrid docs: https://sendgrid.com/docs/Classroom/Send/When_Emails_Are_Sent/seeing_a_delay_with_your_first_few_sends.html
Check shaunwhite above about getting ahold of support to expedite the process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With