[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

SMTP gmail, behind proxy?

Marlor Marlor

3/9/2008 11:58:00 AM

Hello,

I got the action_mailer_tls plugin to work with gmail. (without being
behind a proxy).

My problem is that I have to connect to gmail's smtp from behind a
proxy.
I looked into the SMTP and mailer_tls plugin but couldn't find a way to
set the proxy like in http HTTP::Proxy(..., ...).
Google also didn't help in this case :(

After installing mailer_tls, the below code works without being behind a
proxy:
-------------------------------------------
ActionMailer::Base.delivery_method = :smtp

mmessage = <<END_OF_MESSAGE
From: theName <#{MAIL_SENDER}>
To: #{mail_to.join("; ")}
Subject: #{subject}

#{message.strip}
END_OF_MESSAGE

Net::SMTP.start(MAIL_SMTP, MAIL_PORT, MAIL_DOMAIN,
MAIL_SENDER, MAIL_PASSWORD, :login) do |smtp|
smtp.send_message mmessage,
MAIL_SENDER,
mail_to
end


-------------------------------------------

Any suggestion is appriciated.

Thanks
--
Posted via http://www.ruby-....