![]() |
Indy SMTP 1&1 - authentication credentials invalid
Hallo
Ich habe Probleme beim Einbinden von 1&1 Mailaccounts in mein Programm. Bisher musste ich nur Lotus Notes (OLE) und Strato (Indy) lösen. Das funktioniert. Ich habe den wesentlichen Teil mal in ein Testprojekt gepackt:
Delphi-Quellcode:
Hat jemand eine Idee, was der Fehler sein könnte?
function TfrmMain.Senden1und1: Boolean;
Const cHost = 'smtp.1und1.de'; cPort = 587; Var LSmtp: TIdSMTP; LMsg: TIdMessage; LSsl: TIdSSLIOHandlerSocketOpenSSL; begin Result := False; LSmtp := TIdSMTP.Create(nil); LSsl := TIdSSLIOHandlerSocketOpenSSL.Create(nil); LMsg := TIdMessage.Create(nil); try LMsg.Recipients.EMailAddresses := SMailDataspider; LMsg.From.Address := cMail1und1; LMsg.Subject := 'Test 1 und 1 Subject'; LMsg.Body.Text := 'Test 1 und 1 Bodytext'; LSmtp.Host := cHost; LSmtp.Port := cPort; LSmtp.Username := cMail1und1; LSmtp.Password := cPassword1und1; LSsl.Host := LSmtp.Host; LSsl.Port := LSmtp.Port; LSsl.SSLOptions.Method := sslvTLSv1; LSmtp.IOHandler := LSsl; //LSmtp.UseTLS := utUseRequireTLS; LSmtp.UseTLS := utUseExplicitTLS; LSmtp.Connect; // Wird ausgeführt LSmtp.Send(LMsg); // Fehler authentication credentials invalid LSmtp.Disconnect; finally LMsg.Free; LSsl.Free; LSmtp.Free; end; end; Fehler kommt beim Senden (siehe Quelltextkommentare)... Frank |
AW: Indy SMTP 1&1 - authentication credentials invalid
Hallo,
vielleicht mal sslvTLSv1_2 statt sslvTLSv1 benutzen? |
AW: Indy SMTP 1&1 - authentication credentials invalid
Zitat:
|
AW: Indy SMTP 1&1 - authentication credentials invalid
Bei mir funktioniert das Ganze (bin auch bei IONOS). Hatte aber in der Vergangenheit die gleiche Meldung. Diese kommt vom IONOS Server. Bei mir lag es daran, dass die "From.Address" ungültig war. Es darf nur eine sein und sie muss wie eine gültige E-Mail Adresse aussehen (zumindest mit @ Zeichen und Punkt).
|
AW: Indy SMTP 1&1 - authentication credentials invalid
Zitat:
Hast du auch Port 587 und Explizit TLS? Und AuthType satDefault? Danke Frank |
AW: Indy SMTP 1&1 - authentication credentials invalid
In meinen E-Mail-Programmen steht Port 465 für SMTP mit TLS. Hab zwar (bisher) kein eigenes Delphi-Programm dafür, nutze aber Ionos-Accounts in diversen E-Mail-Programmen.
|
AW: Indy SMTP 1&1 - authentication credentials invalid
Habe das gerade mal schnell mit Delphi getestet, weil ich eh überlege, demnächst in dem Bereich was zu basteln. Port:=465, UseTL:=utUseImplicitTLS, IOHandler:=IdSSLIOHandlerSocketOpenSSL1, AuthType:=satDefault
Dem IOHandler habe ich für den schnellen Test auch einfach nur aufs Formular geklatscht und selber machen lassen. Mail geht raus und kommt auch an. |
AW: Indy SMTP 1&1 - authentication credentials invalid
Das war vorhin einer meiner ersten Gedanken.
Es gibt doch bestimmt noch Provider, die nehmen zu sendende Mails über SMTP nur an, wenn kurz vorher über POP3 oder IMAP eine Verbindung bestand? > Mails abrufen als zusätzliche Authentifizierung für's Versenden |
AW: Indy SMTP 1&1 - authentication credentials invalid
Zitat:
Bei meinem schnell zusammengeklickten Testprogramm war es jedenfalls auch nicht nötig. Da habe ich nur die SMTP-Komponente und nichts mit IMAP/POP3 vorher gemacht. |
AW: Indy SMTP 1&1 - authentication credentials invalid
Bin mir sicher das auch Anfang dieses Jahrtausends nochmal irgendwo gehabt zu haben. :duck:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:01 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz