I need to send out an email to al my customers, i have created a transactional email template which has all the relevant information in it but i do not know how to send this emails to registered customer, can anyone help?
So my question is how can you manually send emails to customers?
Thank you
3 Answers 3
You may need to tinker with some codes to achieve this.
There's a fairly old blog post by Inchoo which detailed the steps to do this:
There's two newer blog posts about it here:
- http://www.techflirt.com/magento-send-custom-email/
- http://navaneeth.me/send-email-using-email-template-in-magento-manually/
If you don't want to tinker with codes, one easy way is to export your client lists to a third-party mailing provider like MailChimp:
You can then send out emails to your clients directly within MailChimp.
-
I like the mailchimp idea as we already use mailchimp for our newsletters. in the email it has varibles for example there names, email address and customer numbers. Do you know if that would all still work using mailchimp?Adam Allen– Adam Allen2014年09月03日 15:28:35 +00:00Commented Sep 3, 2014 at 15:28
-
I don't think the default Magento variables will work. You'll need to replace them with MailChimp's variables.Aspiration Hosting– Aspiration Hosting2014年09月04日 01:32:34 +00:00Commented Sep 4, 2014 at 1:32
Try
$sender = array(
'name' => Mage::getStoreConfig('trans_email/ident_support/name', $storeId),
'email' => Mage::getStoreConfig('trans_email/ident_support/email', $storeId)
);
$vars = array(
'item_html' => $item_html,
);
$templateId = 2;
Mage::getModel('core/email_template')->sendTransactional($templateId, $sender, $email_id , '', $vars, $storeId);
-
where would i put this code? just a .php file then put it in my root?Adam Allen– Adam Allen2014年09月11日 09:37:58 +00:00Commented Sep 11, 2014 at 9:37
-
When do you want to sent the email. Is it like a CRON?John– John2014年09月11日 13:13:25 +00:00Commented Sep 11, 2014 at 13:13
-
no once we have transferred our customer database we need to send out the email directing the user to a page where they can create a new password.Adam Allen– Adam Allen2014年09月11日 13:15:52 +00:00Commented Sep 11, 2014 at 13:15
-
Then you can just put it in your root and call it once. Just make sure you load the Mage class using
require_once "../app/Mage.php";and set the store .John– John2014年09月12日 12:00:17 +00:00Commented Sep 12, 2014 at 12:00 -
1@xxx Sorry man, I do not remember and it's been a while since I have worked in Magento. I think you can get the answer by checking the sendTransactional function in core/email_template model.John– John2017年06月23日 06:53:43 +00:00Commented Jun 23, 2017 at 6:53
you have to first create a template at backend and pass required parameters into it you can find your code here
https://codexcellence.wordpress.com/2015/09/27/sending-emails-in-magento/
-
it sounds like a good instruction, but the link is not availableTheKitMurkit– TheKitMurkit2018年01月02日 14:16:18 +00:00Commented Jan 2, 2018 at 14:16