Email service

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
kuoyehs
Posts: 22
Joined: 09 Sep 2019, 03:01

Email service

Post by kuoyehs » 10 Sep 2019, 03:15

I want to use my service email to send order mail to customers. I follow link settings client/html/email/payment/from-email and client/html/email/payment/from-name, but didn't receive an email.
https://aimeos.org/docs/Configuration/C ... html/email

Do I need to set mail driver, host, port...?

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

Re: Email service

Post by aimeos » 10 Sep 2019, 07:15

Which environment do you use? Laravel?
Run the cron jobs regularly (order/email/payment specifically) and configure your e-mail service in the .env file.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kuoyehs
Posts: 22
Joined: 09 Sep 2019, 03:01

Re: Email service

Post by kuoyehs » 10 Sep 2019, 09:37

Yes, I use Laravel 5.4. Database use postgreSQL. Run php artisan aimeos:jobs order/email/payment and have error message.

SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: character varying = integer
LINE 13: ...cs."type" = 'email-payment' AND mordst_cs."value" IN ( 3 ) )...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.#0 /app/vendor/aimeos/aimeos-core/lib/m
shoplib/src/MShop/Common/Manager/Base.php(378): Aimeos\MW\DB\Statement\DBAL\Simple->execute()
#1 /app/vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Common/Manager/Base.php(792): Aimeos\MShop\Common\Manager\Base->getSearchResults(Object(
Aimeos\MW\DB\Connection\DBAL), '\n\t\t\t\t\tSELECT mo...')
#2 /app/vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Order/Manager/Standard.php(779): Aimeos\MShop\Common\Manager\Base->searchItemsBase(Objec
t(Aimeos\MW\DB\Connection\DBAL), Object(Aimeos\MW\Criteria\PgSQL), 'mshop/order/man...', 'mshop/order/man...', Array, NULL, 2)
#3 /app/vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Common/Manager/Decorator/Depth.php(43): Aimeos\MShop\Order\Manager\Standard->searchItems
(Object(Aimeos\MW\Criteria\PgSQL), Array, NULL)
#4 /app/ext/ai-client-html/controller/jobs/src/Controller/Jobs/Order/Email/Payment/Standard.php(127): Aimeos\MShop\Common\Manager\Decorator\Depth
->searchItems(Object(Aimeos\MW\Criteria\PgSQL))
#5 /app/vendor/aimeos/aimeos-laravel/src/Aimeos/Shop/Command/JobsCommand.php(69): Aimeos\Controller\Jobs\Order\Email\Payment\Standard->run()
#6 [internal function]: Aimeos\Shop\Command\JobsCommand->Aimeos\Shop\Command\{closure}(Object(Aimeos\MShop\Context\Item\Standard), Object(Aimeos\
Bootstrap), 'order/email/pay...')
#7 /app/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Process/Pcntl.php(176): call_user_func_array(Object(Closure), Array)
#8 /app/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Process/Pcntl.php(111): Aimeos\MW\Process\Pcntl->exec(Object(Closure), Array)
#9 /app/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Process/Decorator/Check.php(61): Aimeos\MW\Process\Pcntl->start(Object(Closure), Array, true)
#10 /app/vendor/aimeos/aimeos-laravel/src/Aimeos/Shop/Command/JobsCommand.php(72): Aimeos\MW\Process\Decorator\Check->start(Object(Closure), Arra
y, true)
#11 [internal function]: Aimeos\Shop\Command\JobsCommand->handle()
#12 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#13 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}(
)
#14 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illumina
te\Foundation\Application), Array, Object(Closure))
#15 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundatio
n\Application), Array, Array, NULL)
#16 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array)
#17 /app/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput),
Object(Illuminate\Console\OutputStyle))
#18 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Componen
t\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#19 /app/vendor/symfony/console/Application.php(963): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(S
ymfony\Component\Console\Output\ConsoleOutput))
#20 /app/vendor/symfony/console/Application.php(254): Symfony\Component\Console\Application->doRunCommand(Object(Aimeos\Shop\Command\JobsCommand)
, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /app/vendor/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInp
ut), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Co
mponent\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /app/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Co
nsole\Output\ConsoleOutput))
#24 {main}SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: character varying = integer
LINE 13: ...cs."type" = 'email-payment' AND mordst_cs."value" IN ( 3 ) )...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.#0 /app/vendor/aimeos/aimeos-core/lib/m
shoplib/src/MShop/Common/Manager/Base.php(378): Aimeos\MW\DB\Statement\DBAL\Simple->execute()
#1 /app/vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Common/Manager/Base.php(792): Aimeos\MShop\Common\Manager\Base->getSearchResults(Object(
Aimeos\MW\DB\Connection\DBAL), '\n\t\t\t\t\tSELECT mo...')
#2 /app/vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Order/Manager/Standard.php(779): Aimeos\MShop\Common\Manager\Base->searchItemsBase(Objec
t(Aimeos\MW\DB\Connection\DBAL), Object(Aimeos\MW\Criteria\PgSQL), 'mshop/order/man...', 'mshop/order/man...', Array, NULL, 2)
#3 /app/vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Common/Manager/Decorator/Depth.php(43): Aimeos\MShop\Order\Manager\Standard->searchItems
(Object(Aimeos\MW\Criteria\PgSQL), Array, NULL)
#4 /app/ext/ai-client-html/controller/jobs/src/Controller/Jobs/Order/Email/Payment/Standard.php(127): Aimeos\MShop\Common\Manager\Decorator\Depth
->searchItems(Object(Aimeos\MW\Criteria\PgSQL))
#5 /app/vendor/aimeos/aimeos-laravel/src/Aimeos/Shop/Command/JobsCommand.php(69): Aimeos\Controller\Jobs\Order\Email\Payment\Standard->run()
#6 [internal function]: Aimeos\Shop\Command\JobsCommand->Aimeos\Shop\Command\{closure}(Object(Aimeos\MShop\Context\Item\Standard), Object(Aimeos\
Bootstrap), 'order/email/pay...')
#7 /app/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Process/Pcntl.php(176): call_user_func_array(Object(Closure), Array)
#8 /app/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Process/Pcntl.php(111): Aimeos\MW\Process\Pcntl->exec(Object(Closure), Array)
#9 /app/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Process/Pcntl.php(219): Aimeos\MW\Process\Pcntl->start(Object(Closure), Array, false)
#10 /app/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Process/Pcntl.php(128): Aimeos\MW\Process\Pcntl->waitOne()
#11 /app/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Process/Decorator/Check.php(78): Aimeos\MW\Process\Pcntl->wait()
#12 /app/vendor/aimeos/aimeos-laravel/src/Aimeos/Shop/Command/JobsCommand.php(76): Aimeos\MW\Process\Decorator\Check->wait()
#13 [internal function]: Aimeos\Shop\Command\JobsCommand->handle()
#14 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#15 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}(
)
#16 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illumina
te\Foundation\Application), Array, Object(Closure))
#17 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundatio
n\Application), Array, Array, NULL)
#18 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array)
#19 /app/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput),
Object(Illuminate\Console\OutputStyle))
#20 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Componen
t\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#21 /app/vendor/symfony/console/Application.php(963): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(S
ymfony\Component\Console\Output\ConsoleOutput))
#22 /app/vendor/symfony/console/Application.php(254): Symfony\Component\Console\Application->doRunCommand(Object(Aimeos\Shop\Command\JobsCommand)
, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /app/vendor/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInp
ut), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Co
mponent\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /app/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Co
nsole\Output\ConsoleOutput))
#26 {main}Process (PID "30") failed with status "256"

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

Re: Email service

Post by aimeos » 10 Sep 2019, 09:46

Which Aimeos version are you using?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kuoyehs
Posts: 22
Joined: 09 Sep 2019, 03:01

Re: Email service

Post by kuoyehs » 10 Sep 2019, 09:54

Aimeos version is 2018.10.4

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

Re: Email service

Post by aimeos » 10 Sep 2019, 11:01

We've added a workaround for PostgreSQL. Can you please add run

Code: Select all

composer req aimeos/ai-client-html:2018.10.x-dev
and try again if the problem is solved now?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kuoyehs
Posts: 22
Joined: 09 Sep 2019, 03:01

Re: Email service

Post by kuoyehs » 12 Sep 2019, 02:44

When a customer payment, email will send like laravel echo server, socket.io. How to run "php artisan aimeos:jobs order/email/payment" every minute? Now I have to run the job myself.

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

Re: Email service

Post by aimeos » 12 Sep 2019, 07:18

Set up a system cron job like described here:
https://aimeos.org/docs/Laravel/Configure_cronjobs

Hosting providers may use different ways of creating cronjobs in their admin panels.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kuoyehs
Posts: 22
Joined: 09 Sep 2019, 03:01

Re: Email service

Post by kuoyehs » 24 Sep 2019, 10:59

I set to run "php artisan aimeos:jobs order/email/payment" every minute. The payment email has been sent, but the same email will be sent every min. I want to send it only once.

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

Re: Email service

Post by aimeos » 24 Sep 2019, 20:22

It shouldn't be the case that those e-mails are sent more than once. Is a record in the mshop_order_status table created with "EMAIL_PAYMENT" and value of "5"?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply