[v2.0.0-alpha.1] Email Invoice Interface Not Sending

Hello InvoicePlane Team,

I wanted to report a bug that I’m not sure how to address. I’m having an issue emailing out an invoice from the email UI (screenshot attached). I’d usually just hit send and away goes the email goes and the screen takes me back to the invoice. But now, when I click the Send button, the button changed to Sending for a half second, and then flips back to Send with the email interface is still sitting there. I send all invoices to myself to ensure that the email goes through successfully, but I’m not receiving anything, so even with the UI acting weird, the email is not going out.

Anyone else with v2.0.0-alpha experiencing this?

Thanks!

P.S. - Thank you for your continued support of this application (former FusionWare user)

1 Like

Please post logs from /storage/logs/laravel.log

1 Like

For some reason, all the fields must be filled in including the To, CC, and BCC.

Please try again with a BCC and see if it works.

1 Like

If you use SMTP as the transport it wil work if you populate all fields (TO|CC|BCC). So it seems somewhere in the system its specified that all 3 fields must be filled.

When using only the “To:” field it wont send.

I however found that neither PHPMail nor SendMail works for sending emails even if all the fields are populated. Seems its got something to do with the sendmail transport configuration or path being incorrect.

1 Like

If i change to Sendmail option and use “/usr/sbin/sendmail -bs” as my sendmail path, and fill all the fields (“TO”, “CC” and “BCC”) in i get the following error:

If i change to PHPmail option and fill all the fields (“TO”, “CC” and “BCC”) in i get the following error:

From the Log:
[2018-07-03 08:56:33] production.ERROR: Undefined index: bcc {“userId”:1,“email”:“quinton@qrinceptions.com”,“exception”:"[object] (ErrorException(code: 0): Undefined index: bcc at /home/qrincept/public_html/fusion/app/Modules/MailQueue/Support/MailQueue.php:30)

It’s most definitely not having anything in the BCC. As soon as I put my address there, it went. I am using SMTP.

Good to know, although I’m sure it’s not intended.

1 Like

After looking into it a little further, app/Modules/MailQueue/Support/MailQueue.php is throwing my code compiler fits.

While it’s not stating specifically what’s wrong, the following is red all over:

    return $object->mailQueue()->create([
        'from' => json_encode(['email' => $object->user->email, 'name' => $object->user->name]),
        'to' => json_encode($input['to']),
        'cc' => json_encode(($input['cc']) ?: []),
        'bcc' => json_encode(($input['bcc']) ?: []),
        'subject' => $input['subject'],
        'body' => $input['body'],
        'attach_pdf' => $input['attach_pdf'],

I do know know PHP well enough to track and see what’s wrong.

Has anyone found a solution regarding this issue, or does anyone have a previous stable release of the source code of Fusion invoice that they can make available to me to try out?

Maybe release 2018-8

Much appreciated in advance!

PS - I see in the original installation notes of Fusion invoice 2018-8 it requires you to create an account on the Fusioninvoice.com site to get a app key required to be inserted in the “app.php” config file, does this apply to v2.0.0-alpha1? Could that mabe the reason why outgoing emails does not send? If so, where do i obtain the key as the site does not allow new registrations?

info@spectech-it.co.za

I have tested SendMail, PHPMail and SMTP on my end and all work fine on my end(although possibly due to the changes discussed below. You can find the last version of FusionInvoice on Github.

https://community2.invoiceplane.com/t/topic/6356/8?u=cincinnatimattie

I’m sure there will be a fix for this in the next release but until then you can work around the issue. Sorry, I don’t know enough to offer a more permanent solution.

The account isn’t necessary. There just needs to be 32 characters for the app key which SomeRandomStringWith32Characters is coincidentally 32 characters.

I did as you said, by excluding the 2 arguments below with a “#”

{
protected $error;

public function create($object, $input)
{
    return $object->mailQueue()->create([
        'from' => json_encode(['email' => $object->user->email, 'name' => $object->user->name]),
        'to' => json_encode($input['to']),
        #'cc' => json_encode(($input['cc']) ?: []),
        #'bcc' => json_encode(($input['bcc']) ?: []),
        'subject' => $input['subject'],
        'body' => $input['body'],
        'attach_pdf' => $input['attach_pdf'],
    ]);
}

I now however get the following error:

You will need to remove the other parts of the file calling for the CC and BCC. Lines 44, 45, 60, 68, 69, 78-88. This file will be overwritten with updates so I found it easier to remove the lines rather than try to comment out… less room for error.

If you got to the link posted above, there is the revised code taking out the CC and BCC that you can copy and replace the entire file with until someone has a better solution.

I replaced the file with the revised code as you said but ran into another error. I have sent you a private message.

I created a ticket for this: https://development.invoiceplane.com/browse/IP2-62

3 Likes

Thank you Kovah!

Looks like it was merged into v2.0.0 @cincinnatimattie can you take a look please?

I see that the email issue has been resolved in 2.0.0 Alpha 2

Can anyone tell me where i can download version alpha 2

Version 2.0.0 Alpha 2 is not released yet.

Any ETA on version 2?