Closed dimensi0n closed 3 years ago
I get no errors, but the mail si not sent (I use mailtrap but it works when I send one throug an HTTP Controller). And the offer title is correctly printed on my console.
Someone helped me with this. I had to replace sendLater
with send
in order to make it work. 👍🏻
Does anyone know why this error occurs with sendLater?
Does anyone know why this error occurs with sendLater?
The sendLater
command implies that your mail will be queued in memory and sent later. An Ace command is a short-lived script. The command ends and therefore cleans the process memory before the mail is sent.
There's no reason to use sendLater
in an Ace command since it is not dealing with HTTP.
From the documentation:
This ensures that the email is sent in the background and doesn't block the ongoing HTTP request
Package version
5.2.3
Node.js and npm version
Node.js: v14.16.1 Npm: 6.14.12
Sample Code (to reproduce the issue)