SMTP gmail, behind proxy?

M

Marlor Marlor

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
 

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

Similar Threads

Simple SMTP server in ruby 2
SMTP with Gmail in 1.9.2 1
SMTP SMS Reminder Script 5
Problem with SMTP mail program 3
net/smtp 6
Email/SMTP::NET Problems 24
net/smtp question 6
Problems sending mail 0

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top