Debugging problems with email-sending is really annoying. To get to root of the problem, it’s good to start with a very simple base. For SMTP this usually ends up being netcat’ing or telnet’ing into the mail server and sending the usual commands by hand, looking at the responses on each step.
But sometimes the server requires SSL/TLS connections before allowing you to send mails. OpenSSL has a built-in “netcat with TLS” called s_client
.
Using STARTTLS
openssl s_client -starttls smtp -crlf -connect example.com:25
Citation
If you find this work useful, please cite it as:
@article{yaltirakli,
title = "OpenSSL s client SMTP",
author = "Yaltirakli, Gokberk",
journal = "gkbrk.com",
year = "2024",
url = "https://www.gkbrk.com/openssl-s-client-smtp"
}
Not using BibTeX? Click here for more citation styles.
IEEE Citation Gokberk Yaltirakli, "OpenSSL s client SMTP", September, 2024. [Online]. Available: https://www.gkbrk.com/openssl-s-client-smtp. [Accessed Sep. 02, 2024].
APA Style Yaltirakli, G. (2024, September 02). OpenSSL s client SMTP. https://www.gkbrk.com/openssl-s-client-smtp
Bluebook Style Gokberk Yaltirakli, OpenSSL s client SMTP, GKBRK.COM (Sep. 02, 2024), https://www.gkbrk.com/openssl-s-client-smtp