no config for MAIL_FROM_NAME in order/email/payment job

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
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

no config for MAIL_FROM_NAME in order/email/payment job

Post by VirtualSpy » 01 Nov 2022, 15:12

Laravel version 9.37.0 , Aimeos version 2022.10.3 and PHP version 8.1.3 (Win)

email is going from MAIL_FROM_ADDRESS but there is not using MAIL_FROM_NAME config, it is using the user name of MAIL_FROM_ADDRESS for MAIL_FROM_NAME . I checked vendor\aimeos\ai-controller-jobs\src\Controller\Jobs\Order\Email\Payment\Standard.php but i didn't find anything there for MAIL_FROM_ADDRESS and MAIL_FROM_NAME so please help me for find and implement email jobs for MAIL_FROM_NAME config.

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

Re: no config for MAIL_FROM_NAME in order/email/payment job

Post by aimeos » 03 Nov 2022, 17:54

Configure the name using "resource/email/name" in ./config/shop.php:
https://github.com/aimeos/ai-controller ... il.php#L98
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 config for MAIL_FROM_NAME in order/email/payment job

Post by VirtualSpy » 08 Nov 2022, 07:26

aimeos wrote: 03 Nov 2022, 17:54 Configure the name using "resource/email/name" in ./config/shop.php:
https://github.com/aimeos/ai-controller ... il.php#L98
can i overwrite this file from my extension without this Warning: Ambiguous class resolution, "Aimeos\Controller\Jobs\Mail" was found 2x: , because i want to use other email for jobs

or just tell me why $config->get( 'resource/email/from-name' ) ) this config is not working for jobs......because of this i want to use other email address for jobs
Last edited by VirtualSpy on 08 Nov 2022, 07:38, edited 1 time in total.

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

Re: no config for MAIL_FROM_NAME in order/email/payment job

Post by aimeos » 08 Nov 2022, 18:52

The ./config/shop.php is those of your Laravel application, not inside your Aimeos extension.
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 config for MAIL_FROM_NAME in order/email/payment job

Post by VirtualSpy » 09 Nov 2022, 12:29

aimeos wrote: 08 Nov 2022, 18:52 The ./config/shop.php is those of your Laravel application, not inside your Aimeos extension.
i am not asking about /config/shop.php.....i am asking about \vendor\aimeos\ai-controller-jobs\src\Controller\Jobs\Mail.php
because here

Code: Select all

return $context->mail()->create()
			->header( 'X-MailGenerator', 'Aimeos' )
			->from( $config->get( 'resource/email/from-email' ), $config->get( 'resource/email/from-name' ) )
			->to( $addr->getEMail(), $addr->getFirstName() . ' ' . $addr->getLastName() )
			->bcc( $config->get( 'resource/email/bcc-email' ) );
	}


$config->get( 'resource/email/from-name' ) ) is not working

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

Re: no config for MAIL_FROM_NAME in order/email/payment job

Post by aimeos » 10 Nov 2022, 06:48

Set the sender name in your ./config/shop.php of your Laravel installation in the resource/email section as from-name:
https://github.com/aimeos/aimeos/blob/m ... p.php#L131

or in your ./config/mail.php:
https://github.com/aimeos/aimeos/blob/m ... il.php#L95

or in your .env file as MAIL_FROM_NAME value.
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 config for MAIL_FROM_NAME in order/email/payment job

Post by VirtualSpy » 10 Nov 2022, 12:28

aimeos wrote: 10 Nov 2022, 06:48 Set the sender name in your ./config/shop.php of your Laravel installation in the resource/email section as from-name:
https://github.com/aimeos/aimeos/blob/m ... p.php#L131

or in your ./config/mail.php:
https://github.com/aimeos/aimeos/blob/m ... il.php#L95

or in your .env file as MAIL_FROM_NAME value.
I had already set everything so i am saying , it is not working for jobs because it is taking name from email address for eg. my email is spy@domain.com so it will take spy as a name

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

Re: no config for MAIL_FROM_NAME in order/email/payment job

Post by aimeos » 15 Nov 2022, 17:39

Sad news: Contrary to our previous believe, the Symfony Mime component used by Laravel 9 doesn't support passing e-mail names any more, only e-mail addresses:
https://github.com/aimeos/ai-laravel/bl ... hp#L34-L56
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply