Magento 2: Transportbuilder sending empty mailsMagento dont send transactional mailsMagento mails / cronMagento email_queue sending mails every 2 minutesE-mails won't send MagentoMagento 1.9.2.2 emails not sendingMagento dropshipper e-mailsEmpty email custom module Magento 2 transportBuildermagento 2 e mails not sending since httpsMagento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom Options
Validation accuracy vs Testing accuracy
XeLaTeX and pdfLaTeX ignore hyphenation
How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?
Why is this code 6.5x slower with optimizations enabled?
Is Social Media Science Fiction?
How is this relation reflexive?
Is it possible to do 50 km distance without any previous training?
Why is an old chain unsafe?
Can a German sentence have two subjects?
TGV timetables / schedules?
Do airline pilots ever risk not hearing communication directed to them specifically, from traffic controllers?
Why was the small council so happy for Tyrion to become the Master of Coin?
Why Is Death Allowed In the Matrix?
Could a US political party gain complete control over the government by removing checks & balances?
Is there a minimum number of transactions in a block?
Prevent a directory in /tmp from being deleted
Are tax years 2016 & 2017 back taxes deductible for tax year 2018?
Infinite past with a beginning?
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
What is the offset in a seaplane's hull?
A Journey Through Space and Time
Copycat chess is back
Patience, young "Padovan"
What do you call a Matrix-like slowdown and camera movement effect?
Magento 2: Transportbuilder sending empty mails
Magento dont send transactional mailsMagento mails / cronMagento email_queue sending mails every 2 minutesE-mails won't send MagentoMagento 1.9.2.2 emails not sendingMagento dropshipper e-mailsEmpty email custom module Magento 2 transportBuildermagento 2 e mails not sending since httpsMagento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom Options
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm trying to use the transportbuilder to send an custom email in my module.
I succeed in sending an email, but the body is always empty.
This is my email_templates.xml (placed in view/frontend/email/)
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
</config>
And this is my mail function:
$emailTemplateVariables = array();
$emailTempVariables['ucdata'] = 'dummy';
$sendToEmail = 'email@gmail.com';
$postObject = new MagentoFrameworkDataObject();
$postObject->setData($emailTempVariables);
$sender = array('email' => "info@mywebsite.nl", 'name' => 'Mywebsite');
$transport = $this->_transportBuilder->setTemplateIdentifier('empty_email_template')
->setTemplateOptions(['area' => MagentoFrameworkAppArea::AREA_FRONTEND, 'store' => MagentoStoreModelStore::DEFAULT_STORE_ID])
->setTemplateVars(['data' => $postObject])
->setFrom($sender)
->addTo($sendToEmail)
->setReplyTo($sender['email'])
->getTransport();
$bla = $transport->sendMessage();
And this is my template:
<strong>De volgende producten zijn verwijderd door Lightmakers:</strong> <br><br>
<pre>
trans "Ucdata: %ucData" ucData=$data.ucdata
</pre>
The email is fully blank (no static template content aswell), but I don't get any error messages while sending.
Is there a way to debug this situation?
magento2 email
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm trying to use the transportbuilder to send an custom email in my module.
I succeed in sending an email, but the body is always empty.
This is my email_templates.xml (placed in view/frontend/email/)
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
</config>
And this is my mail function:
$emailTemplateVariables = array();
$emailTempVariables['ucdata'] = 'dummy';
$sendToEmail = 'email@gmail.com';
$postObject = new MagentoFrameworkDataObject();
$postObject->setData($emailTempVariables);
$sender = array('email' => "info@mywebsite.nl", 'name' => 'Mywebsite');
$transport = $this->_transportBuilder->setTemplateIdentifier('empty_email_template')
->setTemplateOptions(['area' => MagentoFrameworkAppArea::AREA_FRONTEND, 'store' => MagentoStoreModelStore::DEFAULT_STORE_ID])
->setTemplateVars(['data' => $postObject])
->setFrom($sender)
->addTo($sendToEmail)
->setReplyTo($sender['email'])
->getTransport();
$bla = $transport->sendMessage();
And this is my template:
<strong>De volgende producten zijn verwijderd door Lightmakers:</strong> <br><br>
<pre>
trans "Ucdata: %ucData" ucData=$data.ucdata
</pre>
The email is fully blank (no static template content aswell), but I don't get any error messages while sending.
Is there a way to debug this situation?
magento2 email
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
did you debug this?
– CompactCode
Dec 2 '17 at 18:46
Did you find the answer? Same issue here.
– Coen Ponsen
Jan 24 '18 at 9:40
add a comment |
I'm trying to use the transportbuilder to send an custom email in my module.
I succeed in sending an email, but the body is always empty.
This is my email_templates.xml (placed in view/frontend/email/)
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
</config>
And this is my mail function:
$emailTemplateVariables = array();
$emailTempVariables['ucdata'] = 'dummy';
$sendToEmail = 'email@gmail.com';
$postObject = new MagentoFrameworkDataObject();
$postObject->setData($emailTempVariables);
$sender = array('email' => "info@mywebsite.nl", 'name' => 'Mywebsite');
$transport = $this->_transportBuilder->setTemplateIdentifier('empty_email_template')
->setTemplateOptions(['area' => MagentoFrameworkAppArea::AREA_FRONTEND, 'store' => MagentoStoreModelStore::DEFAULT_STORE_ID])
->setTemplateVars(['data' => $postObject])
->setFrom($sender)
->addTo($sendToEmail)
->setReplyTo($sender['email'])
->getTransport();
$bla = $transport->sendMessage();
And this is my template:
<strong>De volgende producten zijn verwijderd door Lightmakers:</strong> <br><br>
<pre>
trans "Ucdata: %ucData" ucData=$data.ucdata
</pre>
The email is fully blank (no static template content aswell), but I don't get any error messages while sending.
Is there a way to debug this situation?
magento2 email
I'm trying to use the transportbuilder to send an custom email in my module.
I succeed in sending an email, but the body is always empty.
This is my email_templates.xml (placed in view/frontend/email/)
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
</config>
And this is my mail function:
$emailTemplateVariables = array();
$emailTempVariables['ucdata'] = 'dummy';
$sendToEmail = 'email@gmail.com';
$postObject = new MagentoFrameworkDataObject();
$postObject->setData($emailTempVariables);
$sender = array('email' => "info@mywebsite.nl", 'name' => 'Mywebsite');
$transport = $this->_transportBuilder->setTemplateIdentifier('empty_email_template')
->setTemplateOptions(['area' => MagentoFrameworkAppArea::AREA_FRONTEND, 'store' => MagentoStoreModelStore::DEFAULT_STORE_ID])
->setTemplateVars(['data' => $postObject])
->setFrom($sender)
->addTo($sendToEmail)
->setReplyTo($sender['email'])
->getTransport();
$bla = $transport->sendMessage();
And this is my template:
<strong>De volgende producten zijn verwijderd door Lightmakers:</strong> <br><br>
<pre>
trans "Ucdata: %ucData" ucData=$data.ucdata
</pre>
The email is fully blank (no static template content aswell), but I don't get any error messages while sending.
Is there a way to debug this situation?
magento2 email
magento2 email
asked Oct 12 '16 at 15:27
XaiamediaXaiamedia
91129
91129
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
did you debug this?
– CompactCode
Dec 2 '17 at 18:46
Did you find the answer? Same issue here.
– Coen Ponsen
Jan 24 '18 at 9:40
add a comment |
did you debug this?
– CompactCode
Dec 2 '17 at 18:46
Did you find the answer? Same issue here.
– Coen Ponsen
Jan 24 '18 at 9:40
did you debug this?
– CompactCode
Dec 2 '17 at 18:46
did you debug this?
– CompactCode
Dec 2 '17 at 18:46
Did you find the answer? Same issue here.
– Coen Ponsen
Jan 24 '18 at 9:40
Did you find the answer? Same issue here.
– Coen Ponsen
Jan 24 '18 at 9:40
add a comment |
2 Answers
2
active
oldest
votes
Magento sending empty mail reason is module can not access email template.
Your Sending email code is ok.
You have some directory related issue in putting file .
Follow bellow step.
=> Step 1 : Put bellow email_templates.xml
in Xaiamedia_SyncProducts/etc/
folder
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
</config>
=> Step 2 : put your defined html empty.html
to bellow directory
Xaiamedia_SyncProducts/view/frontend/email/empty.html
All Done!
add a comment |
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
Change
`type="text"` to `type="html"`
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f140518%2fmagento-2-transportbuilder-sending-empty-mails%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Magento sending empty mail reason is module can not access email template.
Your Sending email code is ok.
You have some directory related issue in putting file .
Follow bellow step.
=> Step 1 : Put bellow email_templates.xml
in Xaiamedia_SyncProducts/etc/
folder
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
</config>
=> Step 2 : put your defined html empty.html
to bellow directory
Xaiamedia_SyncProducts/view/frontend/email/empty.html
All Done!
add a comment |
Magento sending empty mail reason is module can not access email template.
Your Sending email code is ok.
You have some directory related issue in putting file .
Follow bellow step.
=> Step 1 : Put bellow email_templates.xml
in Xaiamedia_SyncProducts/etc/
folder
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
</config>
=> Step 2 : put your defined html empty.html
to bellow directory
Xaiamedia_SyncProducts/view/frontend/email/empty.html
All Done!
add a comment |
Magento sending empty mail reason is module can not access email template.
Your Sending email code is ok.
You have some directory related issue in putting file .
Follow bellow step.
=> Step 1 : Put bellow email_templates.xml
in Xaiamedia_SyncProducts/etc/
folder
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
</config>
=> Step 2 : put your defined html empty.html
to bellow directory
Xaiamedia_SyncProducts/view/frontend/email/empty.html
All Done!
Magento sending empty mail reason is module can not access email template.
Your Sending email code is ok.
You have some directory related issue in putting file .
Follow bellow step.
=> Step 1 : Put bellow email_templates.xml
in Xaiamedia_SyncProducts/etc/
folder
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
</config>
=> Step 2 : put your defined html empty.html
to bellow directory
Xaiamedia_SyncProducts/view/frontend/email/empty.html
All Done!
edited Jun 27 '18 at 8:37
Rohan Hapani
6,85431865
6,85431865
answered Dec 28 '17 at 10:58
Abhinav SinghAbhinav Singh
2,115612
2,115612
add a comment |
add a comment |
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
Change
`type="text"` to `type="html"`
add a comment |
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
Change
`type="text"` to `type="html"`
add a comment |
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
Change
`type="text"` to `type="html"`
<template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
Change
`type="text"` to `type="html"`
answered Mar 8 at 18:47
Magento DevMagento Dev
386
386
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f140518%2fmagento-2-transportbuilder-sending-empty-mails%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
did you debug this?
– CompactCode
Dec 2 '17 at 18:46
Did you find the answer? Same issue here.
– Coen Ponsen
Jan 24 '18 at 9:40