Helge Larsen 0 Posted February 14, 2022 Hello Have just converted an older legacy system from using Indy TIdSMTP to ICS TSslSmtpCli component, after Microsoft changed the security requirement to minimum TLS1.2. The old system was mostly sequentialy, so we had to do some rewriting to use the async model, but that is now handled fine. We can now send emails using smtp.office365.com with no problems. In our old system we used to save the send email to a .eml file, that could be opens in outlook. This was done in the Indy MailMessage component with the SaveToFile method. How can we do the same in the ICS TSslSmtpCli component? Share this post Link to post
Angus Robertson 574 Posted February 14, 2022 You should be using the TIcsMailQueue component, there is a working mass mailer example in OverbyteIcsMailQuTst.dpr. You prepare mail using TSslSmtpCli, the queue component saves it as an EML file and places it into a queue from which a thread tries to send it repeatedly to multiple SMTP servers, and when sent successfully the EML file is either deleted or archived. At least I hope it's the correct EML format, I've never tested with other applications. Angus Share this post Link to post
Remy Lebeau 1394 Posted February 15, 2022 15 hours ago, Helge Larsen said: Have just converted an older legacy system from using Indy TIdSMTP to ICS TSslSmtpCli component, after Microsoft changed the security requirement to minimum TLS1.2. Indy (more specifically, its OpenSSL IOHandler) supports TLS 1.2 just fine, so you should not have needed to switch to another SMTP library just to continue communicating with Microsoft. Share this post Link to post
Helge Larsen 0 Posted February 15, 2022 May be Indy supports TLS 1.2 but it still cant connect to Microsoft Office365 SMTP server. May be its something in the other parts of OpenSSL 1.0.2u that does not work. ICS supports OpenSSL 3.0.1 that can connect to Microsoft Office365 SMTP server. Share this post Link to post
KenR 29 Posted February 15, 2022 I can connect fine using Indy and TLS 1.2 so please show your code. Share this post Link to post
Angus Robertson 574 Posted February 15, 2022 ICS SMTP access also supports OAuth2 authentication as standard, which may be required for some Microsoft accounts. Angus Share this post Link to post