[Vortex] Switch to PHPMailer instead of Lunr's Mail class

Review Request #451 — Created Aug. 17, 2016 and submitted

pprkut
Lunr
pprkut:phpmailer
lunr

Switch to PHPMailer instead of Lunr's Mail class.

PHPMailer unfortunately is not reentrant. So in order to keep the thing testable we have to resort to the clone hack.

Unit tests

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
tardypad
  1. Well I can't come up with a better solution than this cloning way given what was discussed (no wrapper wanted, difficult to change the library itself)

    But maybe at least we should put some comments around to say that:
    - the Mailer object from the property should not be used directly for calls because it is not reentrant
    - we should use the result object from clone_mail instead

    It's not ideal to prevent problems but it's better than nothing, and it would clarify the code a bit.

  2. src/Lunr/Vortex/Email/EmailDispatcher.php (Diff revision 1)
     
     
     
     
     

    I think we better call this property $mailer in every class
    Otherwise, for example later in the EmailResponse class, we end up with confusing parameters

    public function __construct($mail, $logger, $email)
    
  3. 
      
pprkut
pprkut
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master

Loading...