Plainer
Members-
Content Count
27 -
Joined
-
Last visited
Everything posted by Plainer
-
Hello, using one of the ICS SMPT mail components is it possible to send rich text in the body of the email? If it is possible can someone recommend the correct component to use. Thanks Will
-
I had a look at the sample "OverbyteIcsMailHtml", I did not see a way of sending a StartTTLS command, I am sure I must have overlooked it. Is this possible and where should I look? Thanks
-
Thank you for advise, I will try the demo you mentioned. Will
-
I did not know that, so with that said, let me ask is it possible to send formatted text using the ICS Smpt component with HTML? What component would you recommend?
-
Batch / bulk email program that reads a database for addresses.
Plainer posted a topic in ICS - Internet Component Suite
I am trying to create an email program that will send a email to mutable email addresses by reading in a database file and sending out a email / newsletter to each record in the database. (for my wife's sewing club) I have been using the "OverbyteIcsSslMailSnd" sample / demo program as an guide. Everything works correctly if I select a record and the send the email. The problem I am having is trying to figure out a way to send the email to each listed email in the database automatically. I can not find a direct means to send the batch of emails, I was thinking that if within the "All In One" button I added a while loop to repeat the process until the database is empty, however that did not work. So next I tried was to add a test button that calls the "All In One" button using the .click method of the button. Procedure Newbutton Database gotop while not database.eof do begin allinonebutton.click; skip database one record; end; The problem I am having on the second loop "Record 2" I receive a error "SMTP Component not ready". I am thinking that I may need some sort of a delay timer between iterations. What am I overlooking? Thanks Will -
Batch / bulk email program that reads a database for addresses.
Plainer replied to Plainer's topic in ICS - Internet Component Suite
Ok, I see that I will make a change and give it a go. Thanks. -
Batch / bulk email program that reads a database for addresses.
Plainer replied to Plainer's topic in ICS - Internet Component Suite
Not to clear on what you meant, however I did make a change by moving the next record call within the case statement. It seemed to make matters worse as it no longer sends out an email but still stops after two records. smtpMailFrom: begin SendNextRecord; SslSmtpClient.RcptTo; end; The solution is simply eluding me, the concept seems simple but proving difficult to do. Can you provide an example on the correct insertion point for the next record call? Thanks -
Batch / bulk email program that reads a database for addresses.
Plainer replied to Plainer's topic in ICS - Internet Component Suite
I think you are right, The two emails that do send return the following after sending a email. First email: RequestDone Rq=5 Error=0 Second email: RequestDone Rq=9 Error=0 I put in a 2 second delay between sends (procedure TEMail_Send.SendNextRecord;) but no real progress, It is on the third email that the system hangs up. This is the code I am currently working with. procedure TEMail_Send.BitBtn4Click(Sender: TObject); begin DataBase_Mail.GoTop; // not sure about this if SslSmtpClient.Connected then begin MessageBeep(MB_OK); Display('All-In-One demo start in connected state.'); Display('Please quit or abort the connection first.'); Exit; end; FAllInOneFlag := TRUE; FEhloCount := 0; { Initialize all SMTP component properties from our GUI } SslSmtpClient.Host := wDataBase_Cfg.GetTrimString('CHOST'); SslSmtpClient.Port := wDataBase_Cfg.GetTrimString('CPORTHOST'); SslSmtpClient.SignOn := wDataBase_Cfg.GetTrimString('CSIGNON'); SslSmtpClient.FromName := wDataBase_Cfg.GetTrimString('CFROM');; SslSmtpClient.HdrFrom := wDataBase_Cfg.GetTrimString('CFROM'); SslSmtpClient.HdrTo := DataBase_Mail.GetTrimString('COWN1EMAIL'); SslSmtpClient.HdrCc := DataBase_Mail.GetTrimString('COWN2EMAIL'); SslSmtpClient.HdrSubject := DataBase_EMailText.GetString('CSUBLINE'); SslSmtpClient.EmailFiles := nil; // FileAttachMemo.Lines; SslSmtpClient.AuthType := TSmtpAuthType(wDataBase_Cfg.GetInteger('NAUTHTYPE')); SslSmtpClient.SslType := TSmtpSslType(wDataBase_Cfg.GetInteger('NSSLType')); if SslSmtpClient.SslType <> smtpTlsNone then begin SslContext1.SslPrivKeyFile := ''; //KeyEdit.Text; SslContext1.SslPassPhrase := ''; //PassPhraseEdit.Text; SslContext1.SslCertFile := ''; //CertEdit.Text; SslContext1.SslCAFile := ''; //CAFileEdit.Text; SslContext1.SslCAPath := ''; //CAPathEdit.Text; //SslContext1.SslVerifyPeer := false; //VerifyPeerCheckBox.Checked; SslContext1.SslVerifyPeer := wDataBase_Cfg.GetLogical('LSSLVERPER'); if SslContext1.SslVerifyPeer then begin SslSmtpClient.OnSslVerifyPeer := SslSmtpClientSslVerifyPeer; SslSmtpClient.OnSslHandshakeDone := SslSmtpClientSslHandshakeDone; end else begin SslSmtpClient.OnSslVerifyPeer := nil; SslSmtpClient.OnSslHandshakeDone := nil; end; end; SslSmtpClient.Username := wDataBase_Cfg.GetTrimString('CUSERNAME'); SslSmtpClient.Password := wDataBase_Cfg.GetTrimString('CPASSWORD'); SslSmtpClient.HdrPriority := TSmtpPriority(wDataBase_Cfg.GetInteger('NPriority')); { Recipient list is computed from To, Cc and Bcc fields } SslSmtpClient.RcptName.Clear; //SslSmtpClient.RcptNameAdd(ToEdit.Text, CcEdit.Text, BccEdit.text); SslSmtpClient.RcptNameAdd(DataBase_Mail.GetTrimString('COWN1EMAIL'), DataBase_Mail.GetTrimString('COWN2EMAIL'), ''); Display('Connecting to SMTP server...'); { Start first operation to do to send an email } { Next operations are started from OnRequestDone event } //BuildRcptList; //SendNextEmail; SslSmtpClient.Connect; end; {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} procedure TEMail_Send.SslSmtpClientRequestDone(Sender: TObject; RqType: TSmtpRequest; ErrorCode: Word); begin { For every operation, we display the status } if (Error > 0) and (Error < 10000) then Display('RequestDone Rq=' + IntToStr(Ord(RqType)) + ' Error='+ SslSmtpClient.ErrorMessage) else Display('RequestDone Rq=' + IntToStr(Ord(RqType)) + ' Error='+ IntToStr(Error)); { Check if the user has asked for "All-In-One" demo } if not FAllInOneFlag then Exit; { No, nothing more to do here } { We are in "All-In-One" demo, start next operation } { But first check if previous one was OK } if Error <> 0 then begin FAllInOneFlag := FALSE; { Terminate All-In-One demo } Display('Error, stoped All-In-One demo'); Exit; end; case RqType of smtpConnect: begin if SslSmtpClient.AuthType = smtpAuthNone then SslSmtpClient.Helo else SslSmtpClient.Ehlo; end; smtpHelo: SslSmtpClient.MailFrom; smtpEhlo: if SslSmtpClient.SslType = smtpTlsExplicit then begin Inc(FEhloCount); if FEhloCount = 1 then SslSmtpClient.StartTls else if FEhloCount > 1 then SslSmtpClient.Auth; end else SslSmtpClient.Auth; smtpStartTls: SslSmtpClient.Ehlo; // We need to re-issue the Ehlo command smtpAuth: SslSmtpClient.MailFrom; smtpMailFrom: SslSmtpClient.RcptTo; smtpRcptTo: SslSmtpClient.Data; smtpData: if DataBase_Mail.Eof then begin SslSmtpClient.Quit; Display('Mail Done !'); end else begin if nSentCount = 0 then begin nSentCount := (nSentCount+1); SentCount.Caption := IntToStr(nSentCount); end; SendNextRecord; end; smtpQuit: if DataBase_Mail.Eof then begin Display('Mail Done !'); end; //else // begin // SendNextRecord; // end; end; {*******************************************************************} end; {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} procedure TEMail_Send.SendNextRecord; begin ShowMessage('Start Test'); Delay(2000); ShowMessage('End Test'); DataBase_Mail.Skip(1); if not DataBase_Mail.Eof then begin FAllInOneFlag := True; SslSmtpClient.RcptName.Clear; SslSmtpClient.RcptNameAdd(Trim(DataBase_Mail.GetTrimString('COWN1EMAIL')), Trim(DataBase_Mail.GetTrimString('COWN2EMAIL')), ''); SslSmtpClient.HdrFrom := wDataBase_Cfg.GetTrimString('CFROM'); SslSmtpClient.HdrTo := DataBase_Mail.GetTrimString('COWN1EMAIL'); SslSmtpClient.HdrCc := DataBase_Mail.GetTrimString('COWN2EMAIL'); SslSmtpClient.HdrSubject := DataBase_EMailText.GetString('CSUBLINE'); SslSmtpClient.SignOn := wDataBase_Cfg.GetTrimString('CSIGNON'); SslSmtpClient.FromName := wDataBase_Cfg.GetTrimString('CFROM'); SslSmtpClient.EmailFiles := nil; // FileAttachMemo.Lines; SslSmtpClient.Host := wDataBase_Cfg.GetTrimString('CHOST'); SslSmtpClient.Port := wDataBase_Cfg.GetTrimString('CPORTHOST'); //SslSmtpClient.SendMode := smtpCopyToStream; SslSmtpClient.Mail; if nSentCount > 0 then begin nSentCount := (nSentCount+1); SentCount.Caption := IntToStr(nSentCount); end; end else exit; end; {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} -
Batch / bulk email program that reads a database for addresses.
Plainer replied to Plainer's topic in ICS - Internet Component Suite
Angus, the example you are talking about is similar but different, your example does send out an email to multiple address but keeps the content of the email static, the program I am working on sends out a unique message to each recipient, by walking though a database, I have a somewhat working model however one small problem and not sure where it stems from, on the third iteration it hangs, does not give an error simply hangs. I was thinking it maybe a timing issue sending to much to the mail server to quickly. I was thinking that if I put in a small pause between each email it may resolve the issue. Can I send you a copy of the code for your review and recommendations? Thank you Will -
Batch / bulk email program that reads a database for addresses.
Plainer replied to Plainer's topic in ICS - Internet Component Suite
I have been looking over the sample program and was wondering if I am on the correct path, I was going to give the following a try but wanted some input first. I was thinking that I can send the next email by using the ClientRequestDone event. I made my additions in bold text so you can see them. {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} procedure TSslSmtpTestForm.SslSmtpClientRequestDone( Sender : TObject; RqType : TSmtpRequest; Error : Word); begin { For every operation, we display the status } if (Error > 0) and (Error < 10000) then Display('RequestDone Rq=' + IntToStr(Ord(RqType)) + ' Error='+ SslSmtpClient.ErrorMessage) else Display('RequestDone Rq=' + IntToStr(Ord(RqType)) + ' Error='+ IntToStr(Error)); { Check if the user has asked for "All-In-One" demo } if not FAllInOneFlag then Exit; { No, nothing more to do here } { We are in "All-In-One" demo, start next operation } { But first check if previous one was OK } if Error <> 0 then begin FAllInOneFlag := FALSE; { Terminate All-In-One demo } Display('Error, stoped All-In-One demo'); Exit; end; case RqType of smtpConnect: begin if SslSmtpClient.AuthType = smtpAuthNone then SslSmtpClient.Helo else SslSmtpClient.Ehlo; end; smtpHelo: SslSmtpClient.MailFrom; smtpEhlo: if SslSmtpClient.SslType = smtpTlsExplicit then begin Inc(FEhloCount); if FEhloCount = 1 then SslSmtpClient.StartTls else if FEhloCount > 1 then SslSmtpClient.Auth; end else SslSmtpClient.Auth; smtpStartTls: SslSmtpClient.Ehlo; // We need to re-issue the Ehlo command smtpAuth: SslSmtpClient.MailFrom; smtpMailFrom: SslSmtpClient.RcptTo; smtpRcptTo: SslSmtpClient.Data; {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} // Check database for EOF if True then finish smtpData: SslSmtpClient.Quit; smtpQuit: Display('All-In-One done !'); exit; {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} end; {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} // Send next email // Get next record reload component and send SslSmtpClient.RcptName.Clear; SslSmtpClient.RcptNameAdd(ToEdit.Text, CcEdit.Text, BccEdit.text); SslSmtpClient.HdrFrom := FromEdit.Text; SslSmtpClient.HdrTo := ToEdit.Text; SslSmtpClient.HdrCc := CcEdit.Text; SslSmtpClient.HdrSubject := SubjectEdit.Text; SslSmtpClient.SignOn := SignOnEdit.Text; SslSmtpClient.FromName := FromEdit.Text; SslSmtpClient.EmailFiles := FileAttachMemo.Lines; SslSmtpClient.SendMode := smtpCopyToStream; SslSmtpClient.Mail; {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} end; -
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 -
Runtime Error with OverbyteIcsSslMailSnd.exe
Plainer replied to Plainer's topic in ICS - Internet Component Suite
Thank you, I have gotten past that now a new problem, I just made a new topic. -
I have been unable to determine requirements that smtp.aol.com is looking for. I am using the follwing: Server Address: smtp.aol.com. Username: Your AOL Mail screen name (e.g. whatever comes before @aol.com) Password: Your AOL Mail password. Port Number: 587 (With TLS) Alternative Port Number: 465 (With SSL) Authentication: Required. However I cannot make a connection to send an email. I think that AOL is using a Yahoo backbone but not to sure. Any ideas on what I am overlooking? Thanks
-
I was able to compile the OverbyteIcsMailQuTst demo program however when I try send a mail I get the following: Opened log file: f:\eMail Demo 2\ics-mailqu-2020-08-06.log Failed to Initialise SSL - Must load LIBEAY DLL before SSLEAY I also received the following: < 530 5.7.0 Must issue a STARTTLS command first. y128sm10201745pfy.74 - gsmtp Failed to Send Mail Item 5 - 530 5.7.0 Must issue a STARTTLS command first. y128sm10201745pfy.74 - gsmtp Any help is welcome. Thanks
-
Seeking a Working email example demo program
Plainer posted a topic in ICS - Internet Component Suite
I am trying to learn how to send a SMTP email that uses StartTLS. I am looking for a working demo program that sends SMTP emails that also can issue a StartTLS command. I have looked at both the OverbyteIcsSslMailSnd and OverbyteIcsMailQuTst demo programs. The OverbyteIcsSslMailSnd has a runtime execption error when the StartTLS is issued "via button" and "All In One" Button. I have also tried the OverbyteIcsSslMailSnd demo program but receive an error too when it tries to make a secure connection the error I receive is "Failed to Initialise SSL - Must load LIBEAY DLL before SSLEAY" If anyone can share a working example demo program for sending emails using the ICS suite, it will be very much appreciated. I am using Delphi7 with the ICS864 component suite. Thank you William -
Seeking a Working email example demo program
Plainer replied to Plainer's topic in ICS - Internet Component Suite
Just found this in my spam folder. Delivery has failed to these recipients: xxxxxxx@aol.com Subject: Delphi Download Password Request Remote Server returned: '554 5.7.9 Message not accepted for policy reasons. See https://help.yahoo.com/kb/postmaster/SLN7253.html' -
Seeking a Working email example demo program
Plainer replied to Plainer's topic in ICS - Internet Component Suite
Ok, this is my confirmation from the server. Your request has been sent and you should receive a copy delivered to your mailbox within a few minutes. If the email does not arrive, this is probably because you have entered an incorrect email address, so you should return to the form and check the address, otherwise you probably won't receive the password email either. -
Seeking a Working email example demo program
Plainer replied to Plainer's topic in ICS - Internet Component Suite
I did I will try again. -
Runtime Error with OverbyteIcsSslMailSnd.exe
Plainer replied to Plainer's topic in ICS - Internet Component Suite
It will not run at my end, I keep getting a run-time exception error when it tries to issue the StartTLS command. Let me as you this, I found this "OpenSSL-Win32\openssl.exe" with the ICS install folders, what is it and does it need to be installed? -
Seeking a Working email example demo program
Plainer replied to Plainer's topic in ICS - Internet Component Suite
I did that just now (did not see the option at first) The site told me it could take up to 48 hours for a reply, I hope they are quicker then that. -
OverbyteIcsMailQuTst mail demo program
Plainer replied to Plainer's topic in ICS - Internet Component Suite
I am using a Windows 7 computer. -
Runtime Error with OverbyteIcsSslMailSnd.exe
Plainer replied to Plainer's topic in ICS - Internet Component Suite
Running on a Windows 7 computer. Tried it on several different computers and same results. -
Seeking a Working email example demo program
Plainer replied to Plainer's topic in ICS - Internet Component Suite
Thank you, however the site will not allow me to download the file it seems to be wanting a logon. Anywhere I can download this example? -
Runtime Error with OverbyteIcsSslMailSnd.exe
Plainer replied to Plainer's topic in ICS - Internet Component Suite
Any idea why this project is throwing a exception error after attempting to StartTLS? Recompiled with ICS864 and the error persists. -
ICS v8.64 can't compile on Delphi 7
Plainer replied to Kyle_Katarn's topic in ICS - Internet Component Suite
Does the inline keyword need to be removed from each *.pas file or is there one location that it can be removed / commented out that will allow D7 to compile ICS864 without errors?