Search the Community
Showing results for tags 'smtp'.
Found 3 results
-
Is it possible to use smtp on android to send multiple emails with attachments and are there any examples of this available. I don't want the email client popping up for each email .... just all done in the background. Thanks in advance. Bill Zwirs
-
Hi Guys, D10.4.2, latest Indy 10, Win 10. I have created a console app with my Indy code in it. The code is exactly the same as I have in my VCL app, same settings/parameters, etc, which works. But. When I run it in the cmd prompt I get the following error. >>EIdTLSClientTLSHandShakeFailed: SSL negotiation failed.<< Now, I freely acknowledge I probably don't have something set right. 😞 Here is the source I have att.. program DBiPREmail; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, IdMessage, IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase, IdMessageClient, IdSMTPBase, IdSMTP, IdBaseComponent, IdComponent, IdIOHandler, IdIOHandlerSocket, IdIOHandlerStack, IdSSL, IdSSLOpenSSL, IdAttachment, IdMessageParts, IdEMailAddress, IdAttachmentFile, IdGlobal, IdText; // These are all in just to start. To be cleaned up when working.. var dmPREmail: TdmPREmail; IdSMTP: TIdSMTP; IdMessage: TIdMessage; IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL; // to allow SSL authenticate // try // try // IdSMTP := TIdSMTP.Create(nil); // try // IdSSLIOHandlerSocketOpenSSL1 := TIdSSLIOHandlerSocketOpenSSL.Create(IdSMTP); // IdMessage := TIdMessage.Create(IdSMTP); // // IO HANDLER SETTINGS // with IdSSLIOHandlerSocketOpenSSL1 do begin MaxLineAction := maException; SSLOptions.Method := sslvTLSv1; end; // IdSMTP.Host := 'my smtp email host'; // IdSMTP.Port := 587; // IdSMTP.Username := 'my user name'; IdSMTP.Password := 'my password'; // IdSMTP.IOHandler := IdSSLIOHandlerSocketOpenSSL1; IdSMTP.AuthType := satDefault; // IdSMTP.UseTLS := utUseExplicitTLS; // // SETTING email MESSAGE DATA // IdMessage.Clear; // IdMessage.From.Address := 'my email address'; IdMessage.Recipients.EMailAddresses := 'second email address'; IdMessage.CCList.EMailAddresses := 'third email address'; // IdMessage.Subject := 'Test Email Subject'; IdMessage.Body.text := 'Test Email Body'; IdMessage.Priority := mpHigh; // with TIdText.Create(IdMessage.MessageParts, nil) do begin // Body.text := Body.text + '<p style="color: #5e9ca0;">This is a test <strong>message</strong> for <span style="color: #ff0000;"><strong>emailing</strong></span>.</p><h1 style="color: #5e9ca0;"> </h1>'; ContentType := 'text/html'; end; // IdMessage.ContentType := 'multipart/mixed'; // try IdSMTP.Connect; except on E: Exception do begin Writeln(E.ClassName, ': ', E.Message); Exit; end; end; // try try IdSMTP.Send(IdMessage); finally IdSMTP.Disconnect(); end; except on E: Exception do begin Writeln(E.ClassName, ': ', E.Message); Exit; end; end; // finally // IdSMTP.Free; // end; // except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; // end. Thoughts, suggestions appreciated.. Regards & TIA, Ian
-
Runtime Error with OverbyteIcsSslMailSnd.exe
Plainer posted a topic in ICS - Internet Component Suite
Report post I am having a runtime error with the OverbyteIcsSslMailSnd.exe demo program it does compile without errors. I trying to learn how to send an email to a Gmail or AOL account however the demo program will complete after issusing the StartTLS comand. The error occurs right after SSL handshake. I am trying it with the All-IN-One button. Thank you for any help that you can provide.Using D7 with ICS858Output from sslmailsend program: Connecting to SMTP server... < 220 smtp.gmail.com ESMTP u15sm4297875pju.42 - gsmtp RequestDone Rq=0 Error=0 > EHLO berns9987a < 250-smtp.gmail.com at your service, [24.116.191.53] < 250-SIZE 35882577 < 250-8BITMIME < 250-STARTTLS < 250-ENHANCEDSTATUSCODES < 250-PIPELINING < 250-CHUNKING < 250 SMTPUTF8 RequestDone Rq=10 Error=0 > STARTTLS < 220 2.0.0 Ready to start TLS Starting SSL handshake RequestDone Rq=12 Error=EAccessViolation Access violation at address 0048A4BF in module 'OverbyteIcsSslMailSnd.exe'. Read of address 00000030 Error, stoped All-In-One demo