Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few issues #5

Open
Every0ne opened this issue May 31, 2020 · 1 comment
Open

A few issues #5

Every0ne opened this issue May 31, 2020 · 1 comment

Comments

@Every0ne
Copy link

Every0ne commented May 31, 2020

  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[]
@s22-tech
Copy link

Check out this fork for these fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants