Simple contact form sending emails via Amazon SES with PHP

2

For a simple contact form I want to use Amazon SES with PHP. Basically PHP will send an email to myself with the email of the user who contacted me to give an answer.

Searching, I came across the following alternatives:

  • Use the PHP Mailer class with the Amazon SES credentials.
  • Configure Postfix as an Amazon SES relay to use PHP's mail () function.
  • Use PHP Mailer together with Postfix as an Amazon SES relay.
  • Questions:

  • What is the purpose of using Postfix as an SES relay if I can just use PHP Mailer informing the server and credentials?
  • Why do some people configure Postfix as an SES relay and still use PHP Mailer, even if PHP Mailer is able to use SES directly?
  • What best, using Amazon SES, to send contact emails and simple transactional emails with PHP?
  • asked by anonymous 25.05.2015 / 21:18

    1 answer

    2

    The three alternatives work, however you should consider the need for application strength and the amount of shipping.

    In alternative 1, your system is directly connected to the Aws SMTP and is blocked while the send list operates, while the 2 and 3 options the system delegates to Local mail service the task of communicating the message queue to AWS, which can happen very quickly and release the system to follow up on other activities.

    For a simple system like the contact form, use the 1 option but for transactional messages from an application I recommend a more robust structure like the 3 option you mentioned.

        
    26.05.2015 / 16:37