Send copy of contact us form with checkboxAdmin order create: Shipping same as Billing always checked: can I clear that?Custom contact form not working with magento installationContact form: Getting error even though email is sentContact Form return me “Unable to submit your request. Please, try again later”Regions dropdown in account creation formHow to create a form on the frontend of a magento storeCan't send sku on contact formMagento checkout and autofill field unwanted resultsSend email depending on selected option in Contact formMagento 2: How to submit form on checkbox click?
Natural Armour and Weapons
What could a self-sustaining lunar colony slowly lose that would ultimately prove fatal?
Why did other houses not demand this?
Is there a context where the expression `a.b::c` makes sense?
Why would a rational buyer offer to buy with no conditions precedent?
Why was this character made Grand Maester?
What does kpsewhich stand for?
Why A=2 and B=1 in the call signs for Spirit and Opportunity?
Can a person survive on blood in place of water?
Why haven't we yet tried accelerating a space station with people inside to a near light speed?
Python program to take in two strings and print the larger string
What are Antecedent & Consequent Phrases in Music?
Can you output map values in visualforce inline using a string key?
Should there be an "a" before "ten years imprisonment"?
Making a electromagnet
Why is the Eisenstein ideal paper so great?
How can I make an argument that my time is valuable?
Do photons bend spacetime or not?
Can I tell a prospective employee that everyone in the team is leaving?
Is it legal to have an abortion in another state or abroad?
Need to read my home electrical Meter
Are there any German nonsense poems (Jabberwocky)?
What weight should be given to writers groups critiques?
Dealing with spaghetti codebase, manager asks for things I can't deliver
Send copy of contact us form with checkbox
Admin order create: Shipping same as Billing always checked: can I clear that?Custom contact form not working with magento installationContact form: Getting error even though email is sentContact Form return me “Unable to submit your request. Please, try again later”Regions dropdown in account creation formHow to create a form on the frontend of a magento storeCan't send sku on contact formMagento checkout and autofill field unwanted resultsSend email depending on selected option in Contact formMagento 2: How to submit form on checkbox click?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am using Magento's contact us form, which, at the moment, doesn't send a copy of the contact us form to the customer who is filling the form in.
I want to control this with a checkbox, therefore i have added a checkbox to the form.phtml page:
<input type="checkbox" name="sendcopy" value="Yes" checked/>
How can i configure the send e-mail function so that it sends out a copy (to the e-mail address which is filled in, in the e-mail field of the contact form) of the e-mail when the checkbox is checked, and doesn't send a copy when it is not checked?
magento-1.7 forms send-mail
add a comment |
I am using Magento's contact us form, which, at the moment, doesn't send a copy of the contact us form to the customer who is filling the form in.
I want to control this with a checkbox, therefore i have added a checkbox to the form.phtml page:
<input type="checkbox" name="sendcopy" value="Yes" checked/>
How can i configure the send e-mail function so that it sends out a copy (to the e-mail address which is filled in, in the e-mail field of the contact form) of the e-mail when the checkbox is checked, and doesn't send a copy when it is not checked?
magento-1.7 forms send-mail
add a comment |
I am using Magento's contact us form, which, at the moment, doesn't send a copy of the contact us form to the customer who is filling the form in.
I want to control this with a checkbox, therefore i have added a checkbox to the form.phtml page:
<input type="checkbox" name="sendcopy" value="Yes" checked/>
How can i configure the send e-mail function so that it sends out a copy (to the e-mail address which is filled in, in the e-mail field of the contact form) of the e-mail when the checkbox is checked, and doesn't send a copy when it is not checked?
magento-1.7 forms send-mail
I am using Magento's contact us form, which, at the moment, doesn't send a copy of the contact us form to the customer who is filling the form in.
I want to control this with a checkbox, therefore i have added a checkbox to the form.phtml page:
<input type="checkbox" name="sendcopy" value="Yes" checked/>
How can i configure the send e-mail function so that it sends out a copy (to the e-mail address which is filled in, in the e-mail field of the contact form) of the e-mail when the checkbox is checked, and doesn't send a copy when it is not checked?
magento-1.7 forms send-mail
magento-1.7 forms send-mail
edited Mar 29 '15 at 14:12
Amit Bera♦
60.7k1682181
60.7k1682181
asked Mar 29 '15 at 13:14
JohnJohn
52111
52111
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You can do this by using bcc function addBcc($post['email]) after -setReplyTo($post['email']) at class Mage_Contacts_IndexController of function postAction().
$mailTemplate = Mage::getModel('core/email_template');
/* @var $mailTemplate Mage_Core_Model_Email_Template */
$mailTemplate->setDesignConfig(array('area' => 'frontend'))
->setReplyTo($post['email'])
<!-- add this -->
->addBcc($post['email'])
->sendTransactional(
Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT),
null,
array('data' => $postObject)
);
Thanks, i understand this part will send the e-mail as BCC to the sender. How can i build in the check, that this function will only be active when the checkbox is checked?
– John
Mar 29 '15 at 14:59
yes. this can do this bcc
– Amit Bera♦
Mar 29 '15 at 15:00
I have added the line, but no e-mail is being sent unfortunately.
– John
Mar 29 '15 at 18:42
add a comment |
I would not recommend this. What's to stop a bot filling out spam content, someone else's email, ticking the box and turning your magento store into a spam server.
If you do decide to do this make sure you have captcha on the form.
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%2f62282%2fsend-copy-of-contact-us-form-with-checkbox%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
You can do this by using bcc function addBcc($post['email]) after -setReplyTo($post['email']) at class Mage_Contacts_IndexController of function postAction().
$mailTemplate = Mage::getModel('core/email_template');
/* @var $mailTemplate Mage_Core_Model_Email_Template */
$mailTemplate->setDesignConfig(array('area' => 'frontend'))
->setReplyTo($post['email'])
<!-- add this -->
->addBcc($post['email'])
->sendTransactional(
Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT),
null,
array('data' => $postObject)
);
Thanks, i understand this part will send the e-mail as BCC to the sender. How can i build in the check, that this function will only be active when the checkbox is checked?
– John
Mar 29 '15 at 14:59
yes. this can do this bcc
– Amit Bera♦
Mar 29 '15 at 15:00
I have added the line, but no e-mail is being sent unfortunately.
– John
Mar 29 '15 at 18:42
add a comment |
You can do this by using bcc function addBcc($post['email]) after -setReplyTo($post['email']) at class Mage_Contacts_IndexController of function postAction().
$mailTemplate = Mage::getModel('core/email_template');
/* @var $mailTemplate Mage_Core_Model_Email_Template */
$mailTemplate->setDesignConfig(array('area' => 'frontend'))
->setReplyTo($post['email'])
<!-- add this -->
->addBcc($post['email'])
->sendTransactional(
Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT),
null,
array('data' => $postObject)
);
Thanks, i understand this part will send the e-mail as BCC to the sender. How can i build in the check, that this function will only be active when the checkbox is checked?
– John
Mar 29 '15 at 14:59
yes. this can do this bcc
– Amit Bera♦
Mar 29 '15 at 15:00
I have added the line, but no e-mail is being sent unfortunately.
– John
Mar 29 '15 at 18:42
add a comment |
You can do this by using bcc function addBcc($post['email]) after -setReplyTo($post['email']) at class Mage_Contacts_IndexController of function postAction().
$mailTemplate = Mage::getModel('core/email_template');
/* @var $mailTemplate Mage_Core_Model_Email_Template */
$mailTemplate->setDesignConfig(array('area' => 'frontend'))
->setReplyTo($post['email'])
<!-- add this -->
->addBcc($post['email'])
->sendTransactional(
Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT),
null,
array('data' => $postObject)
);
You can do this by using bcc function addBcc($post['email]) after -setReplyTo($post['email']) at class Mage_Contacts_IndexController of function postAction().
$mailTemplate = Mage::getModel('core/email_template');
/* @var $mailTemplate Mage_Core_Model_Email_Template */
$mailTemplate->setDesignConfig(array('area' => 'frontend'))
->setReplyTo($post['email'])
<!-- add this -->
->addBcc($post['email'])
->sendTransactional(
Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT),
null,
array('data' => $postObject)
);
edited Mar 29 '15 at 14:59
answered Mar 29 '15 at 14:46
Amit Bera♦Amit Bera
60.7k1682181
60.7k1682181
Thanks, i understand this part will send the e-mail as BCC to the sender. How can i build in the check, that this function will only be active when the checkbox is checked?
– John
Mar 29 '15 at 14:59
yes. this can do this bcc
– Amit Bera♦
Mar 29 '15 at 15:00
I have added the line, but no e-mail is being sent unfortunately.
– John
Mar 29 '15 at 18:42
add a comment |
Thanks, i understand this part will send the e-mail as BCC to the sender. How can i build in the check, that this function will only be active when the checkbox is checked?
– John
Mar 29 '15 at 14:59
yes. this can do this bcc
– Amit Bera♦
Mar 29 '15 at 15:00
I have added the line, but no e-mail is being sent unfortunately.
– John
Mar 29 '15 at 18:42
Thanks, i understand this part will send the e-mail as BCC to the sender. How can i build in the check, that this function will only be active when the checkbox is checked?
– John
Mar 29 '15 at 14:59
Thanks, i understand this part will send the e-mail as BCC to the sender. How can i build in the check, that this function will only be active when the checkbox is checked?
– John
Mar 29 '15 at 14:59
yes. this can do this bcc
– Amit Bera♦
Mar 29 '15 at 15:00
yes. this can do this bcc
– Amit Bera♦
Mar 29 '15 at 15:00
I have added the line, but no e-mail is being sent unfortunately.
– John
Mar 29 '15 at 18:42
I have added the line, but no e-mail is being sent unfortunately.
– John
Mar 29 '15 at 18:42
add a comment |
I would not recommend this. What's to stop a bot filling out spam content, someone else's email, ticking the box and turning your magento store into a spam server.
If you do decide to do this make sure you have captcha on the form.
add a comment |
I would not recommend this. What's to stop a bot filling out spam content, someone else's email, ticking the box and turning your magento store into a spam server.
If you do decide to do this make sure you have captcha on the form.
add a comment |
I would not recommend this. What's to stop a bot filling out spam content, someone else's email, ticking the box and turning your magento store into a spam server.
If you do decide to do this make sure you have captcha on the form.
I would not recommend this. What's to stop a bot filling out spam content, someone else's email, ticking the box and turning your magento store into a spam server.
If you do decide to do this make sure you have captcha on the form.
answered May 17 at 19:35
Dominic XigenDominic Xigen
48610
48610
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%2f62282%2fsend-copy-of-contact-us-form-with-checkbox%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