If not for helpful man pages and online pages from which I needed to find explanation of the man pages, this utility wouldn't exist.
As I write this README page, I haven't yet finished this command. I continue to seek and learn details of the process of sending SMTP mail, and the following pages have, or in the future may, help me figure this whole thing out.
-
SMTP Standard Document
There is a lot here. Links to specific sections are found below. -
Enhanced SMTP Status Codes
In enhanced SMTP (greeting server with EHLO instead of HELO), there may be additional status information following the status code. This document defines the protocol. -
Bounced Email Reckoning
Undelivered emails should initiate some investigation. This page discusses many reasons an email might bounce, and includes a table of SMTP error responses that help identify the type of bounce.
In order to responsibly send emails, one must ensure that refused and bounced emails be strucken from the list to prevent repeated submissions of email that will ultimately be refused.
Most of the work associated with establishing a connection to SMTP servers is useful when connecting to a POP3 server. The difference, as far as I can tell right now, comes in the communication with the server. The following link(s) will illustrate and document the nature of POP3 communication.
The send email through SMTP, a socket must be opened. One must find the IP address of a domain before the socket can be opened.
-
Getting the mail server's IP address through getaddrinfo(), a C function that uses various local and online resources to reconcile a domain. This helpful getaddrinfo page helped me understand how to use getaddrinfo.
-
SMTP with telnet Understanding the sequence of communications with the SMTP server will inform that development of an automated process.
The steps on this page only work for unsecure email. That is, an SMTP conversation without using TLS.
- Testing with OpenSSL and Telnet Although not authoritative or complete, this page provides enough information to begin.
It is easier to observe a server's reply in a terminal than by writing or modifying a program to interpret the reply. SMTP servers can be used through telnet or openssl. This section tries to provide a little head-start to using these utilities to test SMTP interactions.
-
telnet can be used for unencrypted SMTP interactions, usually using port 25.
user@computer: ~$ telnet smtp.gmail.com 587
-
openssl can be used for encrypted interactions.
user@computer: ~$ openssl s_client -connect smtp.gmail.com:587 -starttls smtp
-
Amazon Simple Email Service
I tried to use this. It seemed to work once, but then not again. Perhaps I imagined the first time. I may have to return to this for sandbox testing, but I couldn't figure out how to verify an email address and S3 bucket to receive emails.-
This SES Guide offers a condensed set of instructions to getting a SES account up and running.
-
TXT Record setup gave me some problems that prompted me to call for support from NameCheap support. The helpful support person directed me to the above link to help me understand the TXT record. In short, when Amazon directs you to create a TXT record with a name
_amazonses.your_domain.com
, you set the host name to_amazonses
, which is then a subdomain ofyour_domain.com
.
-
-
PepiPost Sandbox I haven't used this yet, but it may be a sandbox I can use to see how another SMTP server responds.
- SMTP Reply Codes explains codes likes 354, 250, etc.
- Wiki on SMTP Reply Codes
- SMTP Standards about replies
There are so many scenarios for email, I need to test as many as possible if I want this utility to be generally useful.
- Amazon Simple Email Service Mailbox Simulator
This page shows SMTP responses to several types of email. Use these email address (with SES, of course) to ensure likely cases can be handled.