Sometimes SMTP is throwing System.Net.Sockets.SocketException: A connection attempt failed
Please find the Socket Exception has occurred and is unable to send mail later on
Hi,
I am using SMTP token for sending bulk emails but found 'System.Net.Sockets.SocketException: A connection attempt failed'. Also later on trying to send mails gives 'SMTP Exception: Operation has timed out' . Kindly help me to resolve this issue.
Do you mind sharing with me a copy of the script that you used to establish this connection? Additionally, can I check what's the port that you're using?
Based on our documentation here: Create SMTP API Tokens; it mentioned to use 587 for encryption type STARTTLS or 465 for encryption type TLS.