Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I actually just got this working. Wrote a quick script to test it.</p> <p>I was getting a different error than you were (requiring STARTTLS), I also found I had to use port 587 instead of 465.</p> <p>I found the trick to get it working in a Rails plugin I found. (agilewebdevelopment.com/plugins/net_smtp_tls_support)</p> <p>if you 'eval' this file (it adds tls support to the standard Net::SMTP library): </p> <blockquote> <p><a href="http://happiness-is-slavery.net/wp-content/rails-plugins/smtp_add_tls_support/lib/smtp_add_tls_support.rb" rel="noreferrer">http://happiness-is-slavery.net/wp-content/rails-plugins/smtp_add_tls_support/lib/smtp_add_tls_support.rb</a></p> </blockquote> <p>then run 'Net::SMTP.enable_tls()'</p> <p>everything seems to work fine.</p> <p>Here's my code:</p> <pre><code>require 'rubygems' require 'net/smtp' eval File.read("smtp_tls.rb") Net::SMTP.enable_tls() FROM_EMAIL = "REMOVED" PASSWORD = "REMOVED" TO_EMAIL = "REMOVED" msgstr = &lt;&lt;END_OF_MESSAGE From: Your Name &lt;#{FROM_EMAIL}&gt; To: my phone &lt;#{TO_EMAIL}&gt; Subject: text message Date: Sat, 23 Jun 2001 16:26:43 +0900 Message-Id: &lt;unique.message.id.string@example.com&gt; This is a test message. END_OF_MESSAGE Net::SMTP.start('smtp.gmail.com', 587, 'gmail.com', FROM_EMAIL, PASSWORD, :plain) do |smtp| smtp.send_message msgstr, FROM_EMAIL, TO_EMAIL end </code></pre> <p>obviously, i downloaded the above mentioned file to the same directory and named it 'smtp_tls.rb'</p> <p>Hope this helps!</p>
 

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