1.8.7 SMTP TLS How to?

I

Intransition

I know that Ruby 1.8.7 is supposed to support SMTP TLS but damn if I
can find a lick of documentation on it. I had been using the smtp_tls
gem, but wanted to update my code.

Can anyone fill me it?

Thanks.
 
I

Intransition

Well, after beating my head again wall for a couple of hours I answer
my own question:

smtp = Net::SMTP.new(server, port)
smtp.enable_starttls
smtp.start(domain, account, secret, login) do |s|
s.send_message(msg, from, mailto)
end

Why I was having a problem. This does not work:

Net::SMTP.start(server, port, domain, account, secret, login) do
|s|
s.enable_starttls
s.send_message(msg, from, mailto)
end

~trans
 
R

Roger Pack

Why I was having a problem. This does not work:

Net::SMTP.start(server, port, domain, account, secret, login) do
|s|
s.enable_starttls
s.send_message(msg, from, mailto)
end

bug? impossibility?
-r
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top