Is it possible to send e-mails using smtp through proxy with delphi. I have build some e-mail sending applications before, using SSL etc. but i didn't use proxy before, has anyone idea how i can do that with delphi.
Thanks.
Is it possible to send e-mails using smtp through proxy with delphi. I have build some e-mail sending applications before, using SSL etc. but i didn't use proxy before, has anyone idea how i can do that with delphi.
Thanks.
Use INDY components.
if proxy and it's type known in advance, then before sending email you have to authorize in proxy server (suppose, with TidTcpClient). Then with IdSmtp send email.
OR
if type proxy type unknown, try to use IdSocksInfo and IdIOHandlerSocket. Tune them to proxy and bind with idSMTP.
The correct way to use a proxy with Indy's TIdSMTP component is to utilize the SocksInfo (Indy 9 and earlier) or TransparentProxy (Indy 10) property of TIdIOHandlerSocket.
For Indy 9 and earlier (only supports SOCKS v4/4a/5 proxies):
For Indy 10 (supports SOCKS, HTTP, and custom proxies):
If you did it before, did you use Indy or something else? Whatever component you have (Indy, ICS, others) either has Proxy support built in (look at the properties of your internet component set) or it doesn't. If it doesn't, consider "Overbyte ICS" or Indy.
I am not a big fan of Indy. I have used it, but then moved away to Francois Piette's Overbyte ICS components. Try both, if you're not currently using ICS.
This probably ISN'T the way you wanted to go (you said you wanted to use SMTP), but for the benefit of future people searching for ways to do things, I will also add that it is possible to use Windows MAPI integration to do this also, and have an email client program (Thunderbird, Outlook) send the message, from your current email client's "from address", to an email address of your choice, using TJvMail in the JVCL component set.