PHP-SMTP-Mailer icon indicating copy to clipboard operation
PHP-SMTP-Mailer copied to clipboard

A few issues

Open Every0ne opened this issue 5 years ago • 1 comments

  1. Method generateMessageID, base_convert(microtime(), 10, 36) throws Deprecated: Invalid characters passed for attempted conversion under PHP 7.4. Either change microtime to time or use a construct like this base_convert( str_replace( '.', '', microtime(true) ), 10, 36 ) or use something else entirely.
  2. The way the class is currently written disallows sending multiple mails to different recipients, because AddTo method adds each new mail to an array and there is no method to clear it. Doing again $newMail = new SMTPMailer(); throws Notice: Constant NL already defined. Since this class is not written as a singleton, the correct approach would be to replace constant NL definition by a variable or just replace it with "\r\n" string where applied. If it would be written as a singleton, it would need a method to clear $this-to[], and also other arrays like $this->reply_to[], $this->cc[], $this->bcc[] and $this->file[]

Every0ne avatar May 31 '20 09:05 Every0ne

Check out this fork for these fixes.

s22-tech avatar May 30 '22 05:05 s22-tech