Best Email Sending Practices?

The name sounds a little strange, but basically I'm wondering, how should I set up sending email to some server software that I'm writing? Basically, the only time I sent an email, a user registers an account or needs his password reset. Should I use high traffic sites in linux mail application or is there some other method (for example, queue, etc.)?

+6
email
source share
3 answers

I recommend saving the outgoing message to the database, and then completing the delivery sequence so that another application, designed only for sending by e-mail, can deal with timeouts and other dangers - and the queue will allow you to elegantly recover from these failures.

What else, depending on your configuration and the type of message queue platform you use, you can process email on another server or servers so that it does not compete with your application. Not that e-mail was particularly resource-intensive, but every bit of flexibility is taken into account when you are busy scaling.

Finally, for another plus point, a single email delivery application that consumes messages in a queue can serve multiple applications.

+5
source share

It all depends on the web host and what they offer for SMTP. You need to check your web host for the SMTP IP address or server name. This is most likely the same POP3 outgoing SMTP information that they give you for the email accounts associated with your domain.

0
source share

The linux server should provide a program called sendmail (although it can be implemented by exim or postfix ), and this program will process all the queues, try again, etc. You will need to provide some kind of return address to process failures with invalid addresses, etc.

If you are more complicated in your email needs, and if you control what is installed on the server, you can look at qmail in Daniel J Bernstein, but it is set up to help complex users with heavy email loads, and your question tells you you're not there yet.

0
source share

All Articles