deployphp/recipes

Email recipe

ahmadmayahi opened this issue · 4 comments

Q A
Issue Type Feature Request
Deployer Version 6.x

Description

For many people, email recipe is important to get an email whenever deployer fails.

So, we need a new recipe called email.

I suggest using PHP Mailer for this purpose.

If accepted, I will start to work on it.

I'll be better for deployphp/recipes if no addition deps will be added. Mybe if php mailer necessary start it as separate repo?

Well, it’s not that necessary, I can use the PHP built in mail() function for this purpose.

There is one solution without deps - any cloud mailer with GET/Post API.

Well... cloud mailer would be another beast:

  • Amazon SES uses raw data for email content and endpoint get params as auth or would require aws sdk for php
  • Postmark can be handled with GET/POST api with json body as request, but also has dedicated nice to use php lib :)
  • Mailgun same as above but holyyyy that dependencies in php lib :/
  • SparkPost same as above
  • Sendgrid same as above, but a bit less dependencies in php lib
    aaand there's a bunch of others

ALL vary in API.

With mailers using smtp you could too use cloud mailers and their smtp-based service :) So with sending via smtp you get:

  • php mail()
  • PHPMailer
  • Swiftmailer
    Aaaand bunch of other libs

It seems that while mail communication is worthwile pursuit (just like a bunch of other notifiers) it can be done in sooo many ways that @antonmedv is right and IMO it should be separate repos and eventually with suggests in composer.json to them from this repo