Fatal Error when using multiple emails in To field (when sending invoice)

SimpleInvoices Group Forum Forums Fearless359 SimpleInvoices Discussion Group Fatal Error when using multiple emails in To field (when sending invoice)

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #889
    marcnyc
    Participant

    I found that whenever I add more than one email, I get a fatal error and the email is not sent,
    This happens both when the email addresses are separated by comma (,) or by semicolon (;).

    Fatal error: Uncaught Exception: Invalid ‘to’ email address specified in /home/xxx/public_html/invoices/Inc/Claz/Email.php:373 Stack trace: #0 /home/xxx/public_html/invoices/modules/invoices/email.php(65): Inc\Claz\Email->setTo(‘John@xxx…’) #1 /home/xxx/public_html/invoices/index.php(374): include(‘/home/xxx/…’) #2 {main} thrown in /home/xxx/public_html/invoices/Inc/Claz/Email.php on line 373

    I am using Version: 2019.1.1 with PHP 7.1
    Database client version: libmysql – 5.6.43

    #895
    fearless359
    Keymaster

    How are you entering two emails. I just tried it for the “Email To” line and it worked fine. Entry form is first email address, a semi-colon, second email address. Example:

    foo@foo.com;bar@bar.com

    #896
    marcnyc
    Participant

    I have tried both commas (foo@foo.com,bar@bar.com) and semicolon (foo@foo.com;bar@bar.com) and I get the error both ways

    #899
    fearless359
    Keymaster

    Extract the Email.php file from the attached zip archive into the Inc/Claz directory replacing the version you currently have. See if this helps.

    Attachments:
    You must be logged in to view attached files.
    #901
    marcnyc
    Participant

    just tried it.
    still the same error

    #902
    fearless359
    Keymaster

    I don’t have a PHP v7.1 environment to test master_2019.1 in. My recommendation is that you upgrade to PHP v7.2x or later and then use master_2019.2. I test this and it handles the multiple emails with semi-colon seperator just fine.

    #903
    marcnyc
    Participant

    OK thank you

    #911
    RRowley
    Participant

    I took another look at this and believe that a solution was found. The update has been pushed to github for fearless359/master_2019 version 2019.1.2. If you try this, let me know how it works.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.