Use net:smtp behind the proxy

I would like to use net:smtp to send email through smtp.gmail.com. The
problem is that I am behind a proxy, so I need to tell the smtp module
that it should use the proxy (otherwise it won’t be able to resolve
smtp.gmail.com). How can this be done? There is no obvious way for me to
specify the proxy. I am using version 1.8.6 of ruby.

Peter (Guo) Pei wrote:

I would like to use net:smtp to send email through smtp.gmail.com. The
problem is that I am behind a proxy, so I need to tell the smtp module
that it should use the proxy (otherwise it won’t be able to resolve
smtp.gmail.com). How can this be done? There is no obvious way for me to
specify the proxy. I am using version 1.8.6 of ruby.

What sort of proxy? SOCKS4/5? Something else?