I use Pony mail to send emails (because I could never get ActionMailer to work in a local Windows window).
The code in user_mailer.rb includes this call to the Pony.mail method:
Pony.mail({ :to => email_address, :from => 'MyChairSales < support@mychairsales.com >', :subject => subject, :body => email_body, :html_body => html_body, :via => :smtp, :via_options => { :address => 'mail.mychairsales.com', :port => '25', :enable_starttls_auto => true, :user_name => 'mychairs', :password => 'thepassword', :domain => "mychairsales.com"
This worked (I received an email using this method), but now with the error "hostname does not match server certificate".
Here is the top of the stack trace:
["/usr/lib64/ruby/1.9.3/openssl/ssl-internal.rb:121:in `post_connection_check'", "/usr/lib64/ruby/1.9.3/net/smtp.rb:585:in `tlsconnect'", "/usr/lib64/ruby/1.9.3 /net/smtp.rb:560:in `do_start'", "/usr/lib64/ruby/1.9.3/net/smtp.rb:519:in `start'", "/home4/mychairs/ruby/gems/gems/mail-2.4.4/lib/mail/network/delivery_methods /smtp.rb:144:in `deliver!'", "/home4/mychairs/ruby/gems/gems/mail-2.4.4/lib /mail/message.rb:245:in `deliver!'", "/home4/mychairs/ruby/gems/gems/pony-1.4/lib /pony.rb:166:in `deliver'", "/home4/mychairs/ruby/gems/gems/pony-1.4/lib /pony.rb:138:in `mail'", "/home4/mychairs/rails_apps/chairsales/app/mailers /user_mailer.rb:32:in `send_mail'", "/home4/mychairs/rails_apps/chairsales/app/mailers /user_mailer.rb:23:in `send_password_reset_email'",...
Any guidance would be greatly appreciated!
source share