Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Email via Proxy (Indy 10) (https://www.delphipraxis.net/193675-email-via-proxy-indy-10-a.html)

MartinK 28. Aug 2017 15:29

Email via Proxy (Indy 10)
 
Ich möchte, aus einem delphiprogramm heraus, mails versenden.
Diese funktioniert generell tadellos, aber nur so lange wie ich es an einem Rechner ausführe der nicht an einem Proxy hängt.
Führe ich es zB auf einem unserer Firmenrechner aus (Proxy-HTTP einstellungen sind bekannt und ebenso das er NTML benützt. Ebenso funktionieren damit auch HTTP Requests wunderbar)

Ich habe nun bereits einiges probiert aber scheinbar einen Knoten im Hirn zu dessen Auflösung ich etwas Hilfe gutgebrauchen könnte.

Laut Google-Suche ist folgendes hierzu tun:
1.Assign a TIdIOHandlerStack component (derives from TIdIOHandlerSocket) to the TIdSMTP.IOHandler property
2.Assign a TIdSocksInfo, TIdConnectThroughHttpProxy, or other TIdCustomTransparentProxy-derived component to the TIdIOHandlerSocket.TransparentProxy property.
....was ich natürlich auch gemacht habe

Ich bekomme beim "IDSmtp.Connect" immer einen TimeOut sobald ich das über den Proxy laufen lassen möchte

mein Code sieht in etwa so aus
Delphi-Quellcode:
  MyIdSMTP          .IOHandler                           := MyIdIOHandlerStack;
  MyIdIOHandlerStack .TransparentProxy                    := MyIdSocksInfo;
  MyIdIOHandlerStack .Port                                := StrToInt(EProxyPort.text);
  MyIdIOHandlerStack .Host                                := EProxyServer.text;
  MyIdSocksInfo     .Authentication                      := saUsernamePassword;
  MyIdSocksInfo     .Host                                := EProxyServer.text;
  MyIdSocksInfo     .Port                                := StrToInt(EProxyPort.text);
  MyIdSocksInfo     .Username                            := EProxyUsername.text;
  MyIdSocksInfo     .Password                            := EProxyPassword.text;

  MyIdSMTP.Connect;
Help please

vG Martin


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:31 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz