I am using Curl.exe in an application to send emails. I need to support most major email servers. GMail exposes the following ports and Authentication methods.
- TLS/STARTTLS (sometimes called Explicit TLS): uses port 587
- SSL (sometimes called Implicit TLS): uses port 465
I have gotten the Explicit TLS to work using the following command line:
C:\>curl smtp://smtp.gmail.com:587 -v --mail-from "[email protected]" --mail-rcpt
"[email protected]" --ssl -u [email protected]:password -T "c:\test.txt" -k --anyauth
I have tried the following to get ImplicitTLS to work, but it is not.
C:\>curl smtp://smtp.gmail.com:465 -v --mail-from "[email protected]" --mail-rcpt
"[email protected]" --ssl -u [email protected]:password -T "c:\test.txt" -k --anyauth
What are the proper command line parameters to get SSL/Implicit TLS to work?
smtps://...
? – Bruno