Skip to content

Email Library #276

Description

@lonnieezell

The email library is in drastic need of some refactoring. Here's my thoughts:

  • MUST support multiple drivers, including mail, sendmail, smtp, log (for simply saving the generated emails to the writable directory), and for a few services like MailTrap.io, MailGun, Postmark or Mandrill.
  • We can simplify things and make a Mailer class the single point to manage everything about that email, including which views are used, default from values, etc. This also gives us the power to really customize the emails if we need to by tapping into any part of the application to gather data and display it correctly, etc
  • MUST be able to easily queue the emails to be sent at a later date, and/or throttled. This would integrate with the Queue System that is already planned.

In your controllers, when you need to send an email, it would be as simple as:

(new App\Mail\NewUserWelcomeEmail())
    ->to($user->email, $user->name)
    ->send();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions