Note that there are some explanatory texts on larger screens.

plurals
  1. PORuby Mail, how to achieve SSL email
    primarykey
    data
    text
    <p>I have successfully sent email to a remote server using port their port 25 (non-secure) with this script:</p> <pre><code>require 'rubygems' require 'mail' options = { :address =&gt; "mail.domain.com", :port =&gt; 25, :domain =&gt; 'mail.domain.com', :user_name =&gt; 'somedude@domain.com', :password =&gt; 'topsecret', :authentication =&gt; 'login', :enable_starttls_auto =&gt; true } Mail.defaults do delivery_method :smtp, options end mail = Mail.new do from 'someotherdude@otherdomain.com' to 'somedude@domain.com' subject 'This is a test email' body File.read('body.txt') end puts mail.to_s mail.deliver! </code></pre> <p>What I need to do now is use their SSL port 466. When I try it, I get the normal output detailing the message, then it pauses for about 2 minutes and coughs up this:</p> <pre><code>/usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/timeout.rb:60:in `rbuf_fill': execution expired (Timeout::Error) from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill' from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/protocol.rb:116:in `readuntil' from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/protocol.rb:126:in `readline' from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/smtp.rb:911:in `recv_response' from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/smtp.rb:554:in `do_start' from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/smtp.rb:921:in `critical' from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/smtp.rb:554:in `do_start' from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/smtp.rb:525:in `start' from /usr/local/rvm/gems/ruby-1.8.7-p249/gems/mail-2.2.10/lib/mail/network/delivery_methods/smtp.rb:127:in `deliver!' from /usr/local/rvm/gems/ruby-1.8.7-p249/gems/mail-2.2.10/lib/mail/message.rb:243:in `deliver!' from testmail.rb:30 </code></pre> <p>I think this is because it cannot even begin the SSL authentication process. How do I do it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload