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-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
SMTP gmail, behind proxy?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password