CodeIgniter Forums

Full Version: [done] Third Party Email Providers Poll
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The Email feature has not made it into the distributable CodeIgniter 4 yet. The Email class from CI3 did not port gracefully to CI4, and has been redesigned CI4-style. Implementation & testing are under way. This is being developed in the feature/email branch of the CI4 repo.

We held a subforum poll earlier, to see which of the email protocols the community uses, and the answer was all three: mail, sendmail and SMTP.

Planned so far:
[x] separate Email\Email class, which encapsulates an Email entity
[x] Email\TransporterInterface, which abstracts the behavior of a mail transport agent, or a wrapper for same, or even an external email service
[.] Email\Handlers\BaseHandler, which implements the common methods of a Transporter
[.] Email\Handlers\MailHandler, which uses (PHP)mail to send emails; was in CI3
[.] Email\Handlers\SendmailHandler, which uses sendmail to send emails; was in CI3
[.] Email\Handlers\SMTPHandler, which uses SMTP to send emails; was in CI3
[.] revised user guide writeup for handling email
[x] unit testing for Email\Email
[.] unit testing for Email\Handlers\...
[ ] using an external email testing service for unit testing; leaning towads https://mailcatcher.me/


This thread includes a poll, to ascertain the importance of other possible email adapters that might be reasonable to provide.
----------------------------------------------------
This is a roadmap feature, or "epic", and a card on the roadmap board.
Component tasks will show up as issues or PRs on the development board.
We welcome comments & suggestions below.
PHPMailer is my choice.
I use PHP's mail function. So I don't care.
For me PHPMailer.

Maybe I am late into the discussion. But is there plans for easier integration to other transactional email services, ie, AWS SES, Mailgun, Sendgrid, etc?
(03-07-2019, 10:07 AM)kidino Wrote: [ -> ]For me PHPMailer.

Maybe I am late into the discussion. But is there plans for easier integration to other transactional email services, ie, AWS SES, Mailgun, Sendgrid, etc?

That's what I am trying to determine here - which email services are important to the community. I will add those to the poll (which you didn't respond to, btw).
At the current, I use mailgun built on top of the removed email library.
SendGrid is for developers so it should be included, PHPMail has alot of add ons like
email subscription services etc;
It seems to me that both PHPMailer and Swift Mailer would serve the same purpose as the CodeIgniter email class - all are object-oriented solutions to handling email.

I would prefer the CI solution not be an email abstraction layer in the way Query Builder is for multiple databases. Instead, CI Email should be a lightweight class that addresses the basics of using mail(), sendmail(), or SMTP. That would, in the long run, make it easier for users to fully employ any library or API they chose without compromise. It also makes design and maintenance of the CI class a lot less complicated.