I'm having some difficulties sending email.

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!
User avatar
ArthurHenrique
Posts: 18
Joined: 28 Jan 2021, 18:30

I'm having some difficulties sending email.

Post by ArthurHenrique » 07 Jun 2021, 11:28

Could someone help me resolve this issue? I need my application to send an email to confirm the order to customers.
I know Aimeos does this, so far I've changed the following parameters in the .env file:

MAIL_DRIVER=
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=

I also changed some parameters in the mail.php and I'm using SMTP.

Should I make any more changes to make it work? Because if the only thing that needs to be changed is the fields above, maybe I'm entering them wrongly.
Thanks in advance.

Enviroment:
Windows 10
PHP = 7.2
Laravel = 6.0
Aimeos = 2020.10

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

Re: I'm having some difficulties sending email.

Post by aimeos » 08 Jun 2021, 07:21

Did you also set up the cronjob to send the emails, not only the email configuration?
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

User avatar
ArthurHenrique
Posts: 18
Joined: 28 Jan 2021, 18:30

Re: I'm having some difficulties sending email.

Post by ArthurHenrique » 10 Jun 2021, 12:13

I didn't know the need for the cron job, but now I'm trying to fix it. I would like to know how to pass the cron job command correctly, could someone explain it to me in more detail, as it is not working correctly with the documentation command, should I make some change somewhere? Maybe in the path to some specific directory...

* * * * * php /path/to/artisan aimeos:jobs "order/export/csv order/email/delivery order/email/payment order/email/voucher order/service/delivery subscription/export/csv customer/email/account"

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

Re: I'm having some difficulties sending email.

Post by aimeos » 12 Jun 2021, 05:52

You have to adapt "/path/to/artisan" to the absolute path of your application.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ArthurHenrique
Posts: 18
Joined: 28 Jan 2021, 18:30

Re: I'm having some difficulties sending email.

Post by ArthurHenrique » 17 Jun 2021, 12:01

I believe it is now correct, however I'm getting an error message on my host email :

<br />
<b>Fatal error</b>: Directive 'register_globals' is no longer available in PHP in <b>Unknown</b> on line <b>0</b><br />

What could be the problem?

Enviroment:
Windows 10
PHP = 7.4
Laravel = 6.0
Aimeos = 2020.10

Host Environment:
PHP Server = 7.4
Linux

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

Re: I'm having some difficulties sending email.

Post by aimeos » 18 Jun 2021, 05:37

Seems like the php.ini used for the CLI command is very old and has "register_globals" setting still enabled. Execute

Code: Select all

php -v
on your server to see which PHP version is used. Many hoster have several PHP versions installed and you have to select a newer one by hand, e.g. "/usr/bin/php74"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply