Contact Us Email Options
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
Is there a way how to set multiple recipients on Magento 2 Contacts, right now it only allows to set single email.
http://prntscr.com/l3f158
Thanks,
JM
magento2 contact-us
add a comment |Â
up vote
2
down vote
favorite
Is there a way how to set multiple recipients on Magento 2 Contacts, right now it only allows to set single email.
http://prntscr.com/l3f158
Thanks,
JM
magento2 contact-us
You have to create a separate field to achieve this functionality as this field is used in many modules so it will require you to customize at many locations. Instead, you can add a separate field for multiple email addresses.
– Dinesh Yadav
1 hour ago
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Is there a way how to set multiple recipients on Magento 2 Contacts, right now it only allows to set single email.
http://prntscr.com/l3f158
Thanks,
JM
magento2 contact-us
Is there a way how to set multiple recipients on Magento 2 Contacts, right now it only allows to set single email.
http://prntscr.com/l3f158
Thanks,
JM
magento2 contact-us
magento2 contact-us
edited 28 mins ago
shashank
5141035
5141035
asked 2 hours ago
Jm Cabugnason
613
613
You have to create a separate field to achieve this functionality as this field is used in many modules so it will require you to customize at many locations. Instead, you can add a separate field for multiple email addresses.
– Dinesh Yadav
1 hour ago
add a comment |Â
You have to create a separate field to achieve this functionality as this field is used in many modules so it will require you to customize at many locations. Instead, you can add a separate field for multiple email addresses.
– Dinesh Yadav
1 hour ago
You have to create a separate field to achieve this functionality as this field is used in many modules so it will require you to customize at many locations. Instead, you can add a separate field for multiple email addresses.
– Dinesh Yadav
1 hour ago
You have to create a separate field to achieve this functionality as this field is used in many modules so it will require you to customize at many locations. Instead, you can add a separate field for multiple email addresses.
– Dinesh Yadav
1 hour ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
To achieve, this requirement, there are two section, where you have to work.
- First, you have created a new field at system configuration where
you can put multiple emails. - Second, you have to change
MagentoContactModelMail::send
behaviour base using around plugin
So, first create a module which has a system.xml file at app/code/Vendor/ModuleName/etc/adminhtml/
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="contact">
<group id="email">
<field id="recipient_emails" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Send Emails To Multiple Email</label>
</field>
</group>
</section>
</system>
</config>
Around Plugin
<?php
namespace VendorMOdulePlugin;
use MagentoFrameworkMailTemplateTransportBuilder;
use MagentoFrameworkTranslateInlineStateInterface;
use MagentoStoreModelStoreManagerInterface;
use MagentoFrameworkAppObjectManager;
use MagentoFrameworkAppArea;
class EmailPlugin
/**
* @var MagentoFrameworkAppConfigScopeConfigInterface
*/
private $scopeConfig;
/**
* @var ConfigInterface
*/
private $contactsConfig;
/**
* @var TransportBuilder
*/
private $transportBuilder;
/**
* @var StateInterface
*/
private $inlineTranslation;
/**
* @var StoreManagerInterface
*/
private $storeManager;
/**
* Initialize dependencies.
*
* @param ConfigInterface $contactsConfig
* @param TransportBuilder $transportBuilder
* @param StateInterface $inlineTranslation
* @param StoreManagerInterface
di.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MagentoContactModelEmail">
<plugin name="multiple-email-receipts" type="VendorModulePluginEmailPlugin" sortOrder="10" disabled="false" />
</type>
</config>
The code is not tested, give basic of the idea.
add a comment |Â
up vote
0
down vote
Create separate config for other email address then you can create after plugin of
emailRecipient()
method located in
vendor/magento/module-contact/Model/Config.php
file
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
To achieve, this requirement, there are two section, where you have to work.
- First, you have created a new field at system configuration where
you can put multiple emails. - Second, you have to change
MagentoContactModelMail::send
behaviour base using around plugin
So, first create a module which has a system.xml file at app/code/Vendor/ModuleName/etc/adminhtml/
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="contact">
<group id="email">
<field id="recipient_emails" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Send Emails To Multiple Email</label>
</field>
</group>
</section>
</system>
</config>
Around Plugin
<?php
namespace VendorMOdulePlugin;
use MagentoFrameworkMailTemplateTransportBuilder;
use MagentoFrameworkTranslateInlineStateInterface;
use MagentoStoreModelStoreManagerInterface;
use MagentoFrameworkAppObjectManager;
use MagentoFrameworkAppArea;
class EmailPlugin
/**
* @var MagentoFrameworkAppConfigScopeConfigInterface
*/
private $scopeConfig;
/**
* @var ConfigInterface
*/
private $contactsConfig;
/**
* @var TransportBuilder
*/
private $transportBuilder;
/**
* @var StateInterface
*/
private $inlineTranslation;
/**
* @var StoreManagerInterface
*/
private $storeManager;
/**
* Initialize dependencies.
*
* @param ConfigInterface $contactsConfig
* @param TransportBuilder $transportBuilder
* @param StateInterface $inlineTranslation
* @param StoreManagerInterface
di.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MagentoContactModelEmail">
<plugin name="multiple-email-receipts" type="VendorModulePluginEmailPlugin" sortOrder="10" disabled="false" />
</type>
</config>
The code is not tested, give basic of the idea.
add a comment |Â
up vote
2
down vote
To achieve, this requirement, there are two section, where you have to work.
- First, you have created a new field at system configuration where
you can put multiple emails. - Second, you have to change
MagentoContactModelMail::send
behaviour base using around plugin
So, first create a module which has a system.xml file at app/code/Vendor/ModuleName/etc/adminhtml/
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="contact">
<group id="email">
<field id="recipient_emails" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Send Emails To Multiple Email</label>
</field>
</group>
</section>
</system>
</config>
Around Plugin
<?php
namespace VendorMOdulePlugin;
use MagentoFrameworkMailTemplateTransportBuilder;
use MagentoFrameworkTranslateInlineStateInterface;
use MagentoStoreModelStoreManagerInterface;
use MagentoFrameworkAppObjectManager;
use MagentoFrameworkAppArea;
class EmailPlugin
/**
* @var MagentoFrameworkAppConfigScopeConfigInterface
*/
private $scopeConfig;
/**
* @var ConfigInterface
*/
private $contactsConfig;
/**
* @var TransportBuilder
*/
private $transportBuilder;
/**
* @var StateInterface
*/
private $inlineTranslation;
/**
* @var StoreManagerInterface
*/
private $storeManager;
/**
* Initialize dependencies.
*
* @param ConfigInterface $contactsConfig
* @param TransportBuilder $transportBuilder
* @param StateInterface $inlineTranslation
* @param StoreManagerInterface
di.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MagentoContactModelEmail">
<plugin name="multiple-email-receipts" type="VendorModulePluginEmailPlugin" sortOrder="10" disabled="false" />
</type>
</config>
The code is not tested, give basic of the idea.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
To achieve, this requirement, there are two section, where you have to work.
- First, you have created a new field at system configuration where
you can put multiple emails. - Second, you have to change
MagentoContactModelMail::send
behaviour base using around plugin
So, first create a module which has a system.xml file at app/code/Vendor/ModuleName/etc/adminhtml/
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="contact">
<group id="email">
<field id="recipient_emails" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Send Emails To Multiple Email</label>
</field>
</group>
</section>
</system>
</config>
Around Plugin
<?php
namespace VendorMOdulePlugin;
use MagentoFrameworkMailTemplateTransportBuilder;
use MagentoFrameworkTranslateInlineStateInterface;
use MagentoStoreModelStoreManagerInterface;
use MagentoFrameworkAppObjectManager;
use MagentoFrameworkAppArea;
class EmailPlugin
/**
* @var MagentoFrameworkAppConfigScopeConfigInterface
*/
private $scopeConfig;
/**
* @var ConfigInterface
*/
private $contactsConfig;
/**
* @var TransportBuilder
*/
private $transportBuilder;
/**
* @var StateInterface
*/
private $inlineTranslation;
/**
* @var StoreManagerInterface
*/
private $storeManager;
/**
* Initialize dependencies.
*
* @param ConfigInterface $contactsConfig
* @param TransportBuilder $transportBuilder
* @param StateInterface $inlineTranslation
* @param StoreManagerInterface
di.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MagentoContactModelEmail">
<plugin name="multiple-email-receipts" type="VendorModulePluginEmailPlugin" sortOrder="10" disabled="false" />
</type>
</config>
The code is not tested, give basic of the idea.
To achieve, this requirement, there are two section, where you have to work.
- First, you have created a new field at system configuration where
you can put multiple emails. - Second, you have to change
MagentoContactModelMail::send
behaviour base using around plugin
So, first create a module which has a system.xml file at app/code/Vendor/ModuleName/etc/adminhtml/
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="contact">
<group id="email">
<field id="recipient_emails" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Send Emails To Multiple Email</label>
</field>
</group>
</section>
</system>
</config>
Around Plugin
<?php
namespace VendorMOdulePlugin;
use MagentoFrameworkMailTemplateTransportBuilder;
use MagentoFrameworkTranslateInlineStateInterface;
use MagentoStoreModelStoreManagerInterface;
use MagentoFrameworkAppObjectManager;
use MagentoFrameworkAppArea;
class EmailPlugin
/**
* @var MagentoFrameworkAppConfigScopeConfigInterface
*/
private $scopeConfig;
/**
* @var ConfigInterface
*/
private $contactsConfig;
/**
* @var TransportBuilder
*/
private $transportBuilder;
/**
* @var StateInterface
*/
private $inlineTranslation;
/**
* @var StoreManagerInterface
*/
private $storeManager;
/**
* Initialize dependencies.
*
* @param ConfigInterface $contactsConfig
* @param TransportBuilder $transportBuilder
* @param StateInterface $inlineTranslation
* @param StoreManagerInterface
di.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MagentoContactModelEmail">
<plugin name="multiple-email-receipts" type="VendorModulePluginEmailPlugin" sortOrder="10" disabled="false" />
</type>
</config>
The code is not tested, give basic of the idea.
edited 29 mins ago
answered 1 hour ago


Amit Bera♦
54.7k1367160
54.7k1367160
add a comment |Â
add a comment |Â
up vote
0
down vote
Create separate config for other email address then you can create after plugin of
emailRecipient()
method located in
vendor/magento/module-contact/Model/Config.php
file
add a comment |Â
up vote
0
down vote
Create separate config for other email address then you can create after plugin of
emailRecipient()
method located in
vendor/magento/module-contact/Model/Config.php
file
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Create separate config for other email address then you can create after plugin of
emailRecipient()
method located in
vendor/magento/module-contact/Model/Config.php
file
Create separate config for other email address then you can create after plugin of
emailRecipient()
method located in
vendor/magento/module-contact/Model/Config.php
file
answered 1 hour ago


Murtuza Zabuawala
12k62859
12k62859
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f245483%2fcontact-us-email-options%23new-answer', 'question_page');
);
Post as a guest
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
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
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
You have to create a separate field to achieve this functionality as this field is used in many modules so it will require you to customize at many locations. Instead, you can add a separate field for multiple email addresses.
– Dinesh Yadav
1 hour ago