Good afternoon
Is it possible to setup email notifications when invoices were sent to clients please?
Good afternoon
Is it possible to setup email notifications when invoices were sent to clients please?
Any update on this please?
No emails seem to be getting sent.
Hi,
You can configure notifications in the app on Settings > User Details > Notifications.
Thanks.
I’ll try that and get back to you.
Thanks. I have tested and something seems to be wrong.
When I did the v5 migration I setup mail and sent a test and it worked but now, for some unknown reason emails are not being sent.
I went to: Settings // Email Settings and it was set to “Default” but when I tried to send an invoice I got the error “Something went wrong” so I changed the email settings to SMTP and completed the credentials and sent a test mail and that was received. But when I opened the invoice and clicked “Send Invoice” I got the same error: “Something went wrong”.
Are there any details in storage/logs?
Ni error log Hillel but here’s from the laravel.log:
[2024-09-14 21:59:01] production.ERROR: Mailer [] is not defined. {"userId":1,"exception":"[object] (InvalidArgumentException(code: 0): Mailer [] is not defined. at /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php:117)
[stacktrace]
#0 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php(101): Illuminate\\Mail\\MailManager->resolve('')
#1 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php(79): Illuminate\\Mail\\MailManager->get('')
#2 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(357): Illuminate\\Mail\\MailManager->mailer('')
#3 /home/billing2/public_html/app/Services/Email/Email.php(267): Illuminate\\Support\\Facades\\Facade::__callStatic('mailer', Array)
#4 /home/billing2/public_html/app/Services/Email/Email.php(120): App\\Services\\Email\\Email->email()
#5 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Services\\Email\\Email->handle()
#6 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#7 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#8 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#9 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(690): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#10 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call(Array)
#11 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}(Object(App\\Services\\Email\\Email))
#12 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(App\\Services\\Email\\Email))
#13 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#14 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(124): Illuminate\\Bus\\Dispatcher->dispatchNow(Object(App\\Services\\Email\\Email), false)
#15 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}(Object(App\\Services\\Email\\Email))
#16 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(App\\Services\\Email\\Email))
#17 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#18 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(71): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\\Queue\\Jobs\\SyncJob), Object(App\\Services\\Email\\Email))
#19 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call(Object(Illuminate\\Queue\\Jobs\\SyncJob), Array)
#20 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php(76): Illuminate\\Queue\\Jobs\\Job->fire()
#21 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php(56): Illuminate\\Queue\\SyncQueue->executeJob(Object(App\\Services\\Email\\Email), '', NULL)
#22 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(254): Illuminate\\Queue\\SyncQueue->push(Object(App\\Services\\Email\\Email))
#23 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(230): Illuminate\\Bus\\Dispatcher->pushCommandToQueue(Object(Illuminate\\Queue\\SyncQueue), Object(App\\Services\\Email\\Email))
#24 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(77): Illuminate\\Bus\\Dispatcher->dispatchToQueue(Object(App\\Services\\Email\\Email))
#25 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php(193): Illuminate\\Bus\\Dispatcher->dispatch(Object(App\\Services\\Email\\Email))
#26 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php(19): Illuminate\\Foundation\\Bus\\PendingDispatch->__destruct()
#27 /home/billing2/public_html/app/Http/Controllers/EmailController.php(89): App\\Services\\Email\\Email::dispatch(Object(App\\Services\\Email\\EmailObject), Object(App\\Models\\Company))
#28 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(257): App\\Http\\Controllers\\EmailController->App\\Http\\Controllers\\{closure}(Object(App\\Models\\InvoiceInvitation), 0)
#29 /home/billing2/public_html/app/Http/Controllers/EmailController.php(81): Illuminate\\Support\\Collection->each(Object(Closure))
#30 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Http\\Controllers\\EmailController->send(Object(App\\Http\\Requests\\Email\\SendEmailRequest))
#31 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction('send', Array)
#32 /home/billing2/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracing.php(21): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\EmailController), 'send')
#33 /home/billing2/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingRoutingDispatcher.php(18): Sentry\\Laravel\\Tracing\\Routing\\TracingControllerDispatcherTracing->Sentry\\Laravel\\Tracing\\Routing\\{closure}()
#34 /home/billing2/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracing.php(20): Sentry\\Laravel\\Tracing\\Routing\\TracingRoutingDispatcher->wrapRouteDispatch(Object(Closure), Object(Illuminate\\Routing\\Route))
#35 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(260): Sentry\\Laravel\\Tracing\\Routing\\TracingControllerDispatcherTracing->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\EmailController), 'send')
#36 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(206): Illuminate\\Routing\\Route->runController()
#37 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(808): Illuminate\\Routing\\Route->run()
#38 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#39 /home/billing2/public_html/app/Http/Middleware/UserVerified.php(40): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#40 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\UserVerified->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#41 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(124): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#42 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(89): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequestUsingNamedLimiter(Object(Illuminate\\Http\\Request), Object(Closure), 'api', Object(Closure))
#43 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle(Object(Illuminate\\Http\\Request), Object(Closure), 'api')
#44 /home/billing2/public_html/app/Http/Middleware/QueryLogging.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#45 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\QueryLogging->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#46 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(51): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#47 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#48 /home/billing2/public_html/app/Http/Middleware/Locale.php(95): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#49 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\Locale->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#50 /home/billing2/public_html/app/Http/Middleware/TokenAuth.php(102): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#51 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\TokenAuth->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#52 /home/billing2/public_html/app/Http/Middleware/SetDb.php(40): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#53 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\SetDb->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#54 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#55 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#56 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(786): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#57 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#58 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#59 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(201): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#60 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#61 /home/billing2/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/FlushEventsMiddleware.php(13): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#62 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Sentry\\Laravel\\Http\\FlushEventsMiddleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#63 /home/billing2/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(45): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#64 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Sentry\\Laravel\\Http\\SetRequestIpMiddleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#65 /home/billing2/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(31): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#66 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Sentry\\Laravel\\Http\\SetRequestMiddleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#67 /home/billing2/public_html/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#68 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Livewire\\Features\\SupportDisablingBackButtonCache\\DisableBackButtonCacheMiddleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#69 /home/billing2/public_html/app/Http/Middleware/Cors.php(24): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#70 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\Cors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#71 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#72 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#73 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#74 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#75 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#76 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#77 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#78 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#79 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#80 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#81 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#82 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#83 /home/billing2/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Middleware.php(79): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#84 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Sentry\\Laravel\\Tracing\\Middleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#85 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#86 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#87 /home/billing2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#88 /home/billing2/public_html/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#89 {main}
"}
Not sure, it looks like a configuration issue
Thanks.
That doesn’t fill me with confidence. So basically I can’t invoice clients.
I suggest trying to adjust the config, you may want to check if you see a difference in the desktop app
Thanks.
i tried that here:
I suggest checking if the error in the logs is different
Thanks for that. I just checked and this is all that there is in the laravel.log file from today:
[2024-09-15 06:20:02] production.INFO: Performing Autobilling 2024-09-15 06:20:02
But those particular invoices are still sat at unpaid and no emails were sent.
If the clients don’t have cards on file auto-billing won’t work
I understand that. But I need the ability to email the invoice to them to ask for payment.
In your .env file what is the value of
MAIL_MAILER=
The error above indicates that no value has been set.
I found that last night and checked it. It was blank so I filled it out.
PROBLEM SOLVED.