If you happen to see the error “Net::OpenTimeout: execution expired” and if it originating from
/home/ubuntu/.rvm/rubies/ruby-x.x.x/lib/ruby/x.x.x/net/smtp.rb and if you are running your server on AWS EC2 and if you SendGrid using port 587 for smtp mail, then go and enable the port 587 in your AWS Security group.
PS: Better test for other scenarios before opening up a port.
Fix for Net::OpenTimeout: execution expired When on AWS with Rails and Sendgrid
15 sec read