No email send

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Icymars
Posts: 12
Joined: 16 Dec 2020, 18:33

No email send

Post by Icymars » 02 Jan 2021, 16:32

I am having trouble sending the email.
No mail is sent, under any circumstances.
I set up the cronjob and also ran it by hand

Code: Select all

"php artisan aimeos: jobs" order / export / csv order / email / delivery order / email / payment order / email / voucher order / service / delivery subscription / export / csv customer / email / account "
but nothing to do.

I tried to perform a test purchase, in the first attempt not completing the payment and in the second case completing it but nothing.

There is no error in the log and I think I have configured the .env file correctly and the shop file has been configured with the relative email:

Code: Select all

'client' => [
'html' => [
'email' => [
'from-email' => 'xxx',
'from-name' => 'xxxx',
'reply-email' => 'xxx',
'reply-name' => 'xxx',
],

Is there any way to figure out what the problem is?
I also tried to check with the laravel "log" driver but nothing seems to be sent.

Suggestions accepted! :?:

Aimeos: aimeos/aimeos-laravel 2020.10.6
PHP 7.4.3
Laravel 8

User avatar
aimeos
Administrator
Posts: 7926
Joined: 01 Jan 1970, 00:00

Re: No email send

Post by aimeos » 02 Jan 2021, 18:26

Icymars wrote: 02 Jan 2021, 16:32

Code: Select all

"php artisan aimeos: jobs" order / export / csv order / email / delivery order / email / payment order / email / voucher order / service / delivery subscription / export / csv customer / email / account "
Your command looks wierd! The documentation contains examples, e.g.:

Code: Select all

php artisan aimeos:jobs "order/export/csv order/email/delivery order/email/payment order/email/voucher order/service/delivery subscription/export/csv customer/email/account"
https://aimeos.org/docs/latest/laravel/ ... ery-minute
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Icymars
Posts: 12
Joined: 16 Dec 2020, 18:33

Re: No email send

Post by Icymars » 02 Jan 2021, 18:33

The forum "code" statement has dirtied the istruction.
I used it correctly as written in the documentation.
I also tested the sending of emails through the password recovery integrated with jetstream and it works correctly. Then say that the .env file is configured correctly.

Could it be that I missed some further configuration in the file shop?

Thanks Aimeos

Icymars
Posts: 12
Joined: 16 Dec 2020, 18:33

Re: No email send

Post by Icymars » 03 Jan 2021, 09:51

I checked the code and did a bit of debugging to check where the problem was: I noticed that the mails are not sent because never enter into foreach that cycle the sending; the variables are empty!

So I start to think that it is not clear to me when the emails are sent!

I performed some tests: I created an account and entered an object among those observed for a price drop. I, therefore, expect that when I go to lower the price of that object and execute the job

Code: Select all

php artisan aimeos:jobs customer/email/watch
, an email will be sent to the user about the price drop. Quite right? However, this does not happen.

Could it be caused by the type of product indicated as "select"?

EDIT:: All work properly! Sorry for the inconvenience.

I also add a small comment: wouldn't it be better to implement automatic sending of emails when a purchase is made? In the same way, when updating the status (payments, shipments) it would be more direct to send an email automatically without delegating the work to the cronjob.

Continuing to run a script to check if a user has just signed up or there are new updates seems to me a waste of resources considering that it can be done when the operation is performed. Do not you think?

User avatar
aimeos
Administrator
Posts: 7926
Joined: 01 Jan 1970, 00:00

Re: No email send

Post by aimeos » 04 Jan 2021, 10:47

Icymars wrote: 03 Jan 2021, 09:51 I also add a small comment: wouldn't it be better to implement automatic sending of emails when a purchase is made? In the same way, when updating the status (payments, shipments) it would be more direct to send an email automatically without delegating the work to the cronjob.
No, because this would trigger an e-mail whenever the payment gateway sends and update notification and this can be done several times. In this case, the customer would get more than one e-mail.
Icymars wrote: 03 Jan 2021, 09:51 Continuing to run a script to check if a user has just signed up or there are new updates seems to me a waste of resources considering that it can be done when the operation is performed. Do not you think?
On user signup, a message is added to the message queue than an e-mail should be sent. The cronjob checks the message queue and terminates immediately if nothing must be done. Everything in Aimeos is designed to be fail-safe (nothing gets lost or is done more than once) and scalable (work is off-loaded from the frontend to avoid notable performance degradation for customers).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

TGergo
Posts: 41
Joined: 24 Nov 2022, 14:35

Re: No email send

Post by TGergo » 19 Dec 2022, 12:50

I also tried the watch job

I subscribed to the price change and when the product becomes available again.

I then ran the job command
php artisan aimeos:jobs customer/email/watch

I did not get an e-mail.

Where is it stored in the database?

Other jobs send email.

php version 8.1
Windows 10
Aimeos version 2022.10.2.

User avatar
aimeos
Administrator
Posts: 7926
Joined: 01 Jan 1970, 00:00

Re: No email send

Post by aimeos » 20 Dec 2022, 15:45

TGergo wrote: 19 Dec 2022, 12:50 I also tried the watch job
I subscribed to the price change and when the product becomes available again.
I then ran the job command
Did you change the price after watching the product in the frontend?
TGergo wrote: 19 Dec 2022, 12:50 Where is it stored in the database?
Customer/product references are stored in the users_list table.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

TGergo
Posts: 41
Joined: 24 Nov 2022, 14:35

Re: No email send

Post by TGergo » 21 Dec 2022, 08:31

I subscribed to the price change and when the product becomes available again.
Yes, I changed the price, became cheaper. And added more stocks to the missing product.
And after I ran the job command.

User avatar
aimeos
Administrator
Posts: 7926
Joined: 01 Jan 1970, 00:00

Re: No email send

Post by aimeos » 22 Dec 2022, 10:56

Did you rename the default site?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

Re: No email send

Post by VirtualSpy » 23 Dec 2022, 08:01

aimeos wrote: 22 Dec 2022, 10:56 Did you rename the default site?
yes I renamed the default site and I am also not getting an email from customer/email/watch job

Post Reply