Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8970179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:41:43+00:00 2026-06-15T17:41:43+00:00

I am using Pony mail to send email messages (because I could never get

  • 0

I am using Pony mail to send email messages (because I could never get ActionMailer to work on my local Windows box).

The code in my user_mailer.rb file include 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" # the HELO domain provided by the client to the server
  } 
 })

This was working (I have received email using this method) but is now failing with the error “hostname does not match the 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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:41:43+00:00Added an answer on June 15, 2026 at 5:41 pm

    A bit late but I also encountered this error but with the Ruby Mail gem. If your SMTP server supports TLS, it will attempt to use TLS and authenticate the SSL certificate. If the certificate is issued for a hostname other than the one used or if the certificate cannot be authenticated (for example if it’s self-signed and you don’t trust the CA), then it will fail with the error “hostname does not match the server certificate”.

    To get around it, use the :openssl_verify_mode option. This can be set to OpenSSL::SSL::VERIFY_NONE to do no verification of the certificate – it will still encrypt the SMTP session though. Or there are other options available within the OpenSSL library.

    Using your example, it would be:

    Pony.mail({
      :to => email_address, 
      :from => 'MyChairSales <support@mychairsales.com>', 
      :subject => subject, 
      :body => email_body, 
      :html_body => html_body,
      :via => :smtp,
      :via_options => {
        :openssl_verify_mode => OpenSSL::SSL::VERIFY_NONE, 
        :address              => 'mail.mychairsales.com',
        :port                 => '25',
        :enable_starttls_auto => true,
        :user_name            => 'mychairs',
        :password             => 'thepassword',
        :domain               => "mychairsales.com" # the HELO domain provided by the client to the server
      } 
     })
    

    This also works for the Mail gem as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i've been using ruby pony gem to send emails https://github.com/benprew/pony#readme unfortunately documentation is not
I'm using the Pony gem to send emails. Assuming that I have both options
I'm trying to build an app using Sinatra, Ruby, rack, haml, pony and SendGrid,
Using the Redis info command, I am able to get all the stats of
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
Using Android NDK is it possible (from native C-code) to get a list of
Using batch script, I want to get a first token of a line delimited
Im trying to override devise in order to send mail to activate a user.
In my rails application (running on a mac), I'm using a gem called pony.
Using the C# Facebook SDK 5.0.3 everything works fine whit the client.Get(/me). But when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.