Skip to content

A few issues #5

@Every0ne

Description

@Every0ne
  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[]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions