Magento Newsletter

Magento Newsletter

If you’re using Magento you probably noticed by now that you have integrated newsletter system with it. By default, visitors are able to subscribe to your newsletter via Magento Newsletter subscription form in sidebar.

Besides newsletter subscribers, all of your store’s registered users will also appear in your Magento’s newsletter e-mail database. This database also contains information on different store views, allowing you to easily send multiple variations of your newsletter to different store view subscribers. This feature is extremely useful when dealing with multiple language web shops.

How to send a Magento Newsletter?

Newsletter Template:

The process of sending out Magento Newsletter starts with creation of Newsletter Template. Once you create this template, the template will remain there even after you send your newsletter to subscribers, allowing you to change it and use it multiple times. You can create multiple newsletter templates with different styling and test them to see which one attracts the most response from subscribers.

newsletter template

Simply click on “Add new template” button on the right and start creating your first newsletter template. You will see a screen with 5 fields. All of the fields are required. You will also notice that the largest field (“Template content” field)  already has some sort of code inside. Do not remove this code. This code will generate the unsubscribe link for your newsletter. Make sure that whatever you do this code remains on the bottom.

When creating newsletter template for Magento, note that you can actually use HTML in it. This means that if you’re not a tech savvy person, you can simply use some WYSIWYG editor and copy / paste the code it creates into your newsletter template once you’re done. In addition, if you wish to have WYSWYG editor inside your magento, check out our article on how to use TinyMCE with Magento.

Newsletter Queue:

If you open this tab in the newsletter top menu, you will notice that there are no newsletters in queue. In order to queue a newsletter you need to open “Newsletter Template” screen once again and in the action box next to your template choose “Queue Newsletter”. This action will bring up the “Edit Newsletter” screen. Notice that you can choose which store view subscribers are going to receive the newsletter. To select multiple store views, hold Ctrl key and left click on store views you wish to use. (this will only be necessary if you’re using more then one store view).

newsletter queue

You also need to set a Queue date start. Notices that the date and time you set are in fact server date and time, not your date and time. If you wish to send your newsletter immediately, you need to set it to your current server date and time or set it into past.

Newsletter Subscribers Export:

If you wish to use some other service for sending your newsletter you can easily export your Magento newsletter subscribers via admin panel. Access the “Newsletter Subscribers” screen via top menu. On the top right you will see select box with options to export your newsletter subscribers in form of CSV or XML. Export it in a form that best fits the import options of your other newsletter solution.

Can’t send Magento newsletter? Here are some common problems:

  • Your server time is different then your local time and you’ve actually queued the newsletter to be sent a few hours in future and that’s why it’s not sent right now.
  • Magento sent only small part of emails? Don’t worry, it will send them out. Magento has integrated limit on the number of emails it can send at once. Eventually, all of your emails will be sent.
  • You might need to activate your cron job as it’s often a case cron job is causing you problem. This means you will need to visit this address insert-your-magento-store.com/cron.php manually with your internet browser.

You made it all the way down here so you must have enjoyed this post! You may also like:

How To Connect Google Analytics 4 To Magento 2 Bojan Mareljic
Bojan Mareljic, | 35

How To Connect Google Analytics 4 To Magento 2

3 best open-source eCommerce platforms in 2021 Zrinka Antolovic
Zrinka Antolovic, | 7

3 best open-source eCommerce platforms in 2021

Do not accept this project if you… Aron Stanic
Aron Stanic, | 3

Do not accept this project if you…

60 comments

  1. I understand how to set up the newsletter and how to bring it to queue. However, my newsletter is not getting sent out! It continues to read “sending” after almost a day… and I only have less than 200 subscribers! Help!?!

  2. Does anybody know why, when a customer process an order, the field “Website”, “Store” and “Store view” in “Newsletter Subscribers” are set to null?

    Thanks

  3. Hello Pratik,

    1. Login your back-end
    2. Select menu “CMS/Static Block” >> click on the button “Add New Block” >> Fill the information (block title, Identifier, Store View…) for this block. In the content field, add this code:
    {{block type=”newsletter/subscribe” name=”left.newsletter” template=”newsletter/subscribe.phtml”}}

    Hope it will helpful for you.

    -Inder

  4. I have read carefully your instructions and followed them. But NOWHERE do you say precisely how to send a newsletter. Is this supposed to be automatic, based on the queue date. Is there a drop-down somewhere that offers me a “Send” choice?

    It may all seem obvious to you, but it is not obvious to me. I have newsletters in the queue. I want to send them. How do I do it?

  5. Hey, I created a generic newsletter template and queued it up. How can I remove this form the Queue!?

  6. Hi.

    I´m trying to complete a newsletter template with some dynamically featured/promotion/etc products. I´m trying with a block filtered by brand and category: {{block type=”catalog/product_list” brand_filter=”41″ template=”catalog/product/list.phtml”}} …. also try a template block extension included, but it don´t works.

    I don´t really know if i can use blocks or the code to display featurd products with variables in newsletters.

    Can somebody help me?

    Thx a lot…

  7. @Toni Anicic

    Thanks for reply. i have 1.4.0.2 magento. giving error while trying to add newsletter to queue. “queuecontrol undefined” in javascript.

    Please help if you can..

  8. same problem as david. nothing happens when click on save button for queuing the newsletter. javascript error “queuecontrol is undefined”.

    please help…!!!!!!!

  9. From newsletter template under dropdown, I chose queue newsletter. The edit newsletter screen comes up. I set the date and time and click the save newsletter button, but nothing happens. No error message. Please help.

  10. thanks for ur post….i am adding an widget to show latest products in my newsletter. now when i sent that newsletter , the widget is not comming…..please help….

  11. Hi, I don’t know whether this is the right place to put up this question but I’ll be glad if someone can provide me a solution. I want to add a new field called ‘Name’ to the newsletter subscription block which originally has just one field of email. How can I achieve this? 🙁

  12. Steve, I was also in the same position as u few weeks back. I suggest findinfg some decent looking templates on themeforesyt.com or even use some free html email tremplate. Just yahoo “email template sample” and u should be presented with many samples.

    Download a suitable sample, get to its HTML version and copy and paste that into a new email template.

  13. I apologize in advance for this most basic question: How do I create the newsletter itself? I have no problem with the sending, but I don’t know how to add photos or graphics or change fonts or put my company logo on the page or anything. I tried creating in word and copy/paste into the template. I know I need to know some code but I don’t know where I can find a sample. If I had a sample of one I could figure it out. Thanks in advance.

  14. I want to attach a file with the newsletter template. Is there any way to attach the file with the newsletter using admin section. Please suggest solution.

  15. Good article Inchooers – using Magento to send out e-mail is ok if you have a few hundred e-mails or so. When you have a large mailing list, using magento will really tax your server and maybe even cause performance issues.

  16. Hello i have problem with newsletter – most mail clients marks it as a SPAM. I think about sending from other program, but i have not idea how to create correct unsubscribe link…. anyone can help ?

  17. Edit: I am not able to create newsletter queue. When i click “save Newsletter”, nothing happens. Gives javascript error. that is queueControl is not defined.
    Also there in not “subscribers from” drop down in queue information page.
    Please help

  18. I am not able to create newsletter queue. When i click “save Newsletter”, nothing happens. Gives javascript error. that is queueControl is not defined. Please help

  19. Hi,

    We have just set up our newsletter to run for the first time, and this was successfully sent out to a small group of subscribers. Unfortunately none of the images within the letter are displayed properly, although these appear absolutely fine when the newsletter is previewed within Magento. All other links on the newsletter are working correctly from the email.

    Any suggestions would be gratefully received!

    Cheers,

    Olly

  20. Hey Inchoo…

    Any idea why Magento would be messing-up some of my CSS from my newsletter?

    I’ve been pasting my content into the MESSAGE (not the template – is that correct?). They used to send fine, but now I’m losing all my CSS backgrounds.

    Newsletter should be this: http://www.toggle.co.nz/006.html
    But what gets sent out is this: http://www.toggle.co.nz/Capture.JPG

    This used to work though, and I used to get well formatted messages like these (using the same code base)….

    But what gets sent out is this: http://www.toggle.co.nz/Capture2.JPG

    I orginally thought this might have been local to Thunderbird, as when I was using the WYSIWIG in the Queue action it all looked great, but now when I go back in to look at the queue it has the uglier version (with the blue outlines).

    Any ideas… have I slipped something non-email friendly in there?!?!?!

    Head scratch is starting to scar, and the boss is giving me untold grief about the look n feel.

    Cheers,
    Todd

  21. I finally managed to solve my problem.

    In my travel around the world of Magento emails, I’ve discovered some interesting ponits:

    – Since newsletters are sent in bunches of 3, if 3 of them get some kind of error, ALL of them will get stuck. Triying with those 3 everytime the cron job is launched. So check your queues!! (I think it will be the same for the limit of 20 subscriptors per newsletter)

    – Regular emails (welcome, subscription, etc) are sent in a diferent way than the newsletters are. So, if you get regular emails from Magento but nothing about newsletters, see the next point.

    – I’ve mounted my own email server and it had a misconfiguration. So check your mail server configuration!!

    I have to mention it was very useful to have all the info along this thread.

    Thanks to all for helping me!!

  22. @Guille:
    You have to put that code in the cron job file only:

    require 'app/Mage.php';
    if (!Mage::isInstalled()) {
    echo "Application is not installed yet, please complete install wizard first.";
    exit;
    }
    
    // Only for urls
    // Don't remove this
    $_SERVER['SCRIPT_NAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_NAME']);
    $_SERVER['SCRIPT_FILENAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_FILENAME']);
    
    Mage::app('admin')->setUseSessionInUrl(false);
    
    try {
    Mage::getConfig()->init()->loadEventObservers('crontab');
    Mage::app()->addEventArea('crontab');
    Mage::dispatchEvent('default');
    $ob = Mage::getModel('catalogrule/observer');
    $ob->dailyCatalogUpdate("0 1 * * *");
    } catch (Exception $e) {
    Mage::printException($e);
    }
    ?>

    And only run cron.php file in the browser. It will show only blank page. because we are not printing anything in the file. we are just executing code to send newsletter mail to all subscribers.

  23. but the newsletter not send to the subscriber any way..
    i’ve been workin for this over 24 hours please lead me to the right direction…….

  24. Hi guys,

    I have cron job :

    require 'app/Mage.php';
    
    if (!Mage::isInstalled()) {
        echo "Application is not installed yet, please complete install wizard first.";
        exit;
    }
    
    // Only for urls
    // Don't remove this
    $_SERVER['SCRIPT_NAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_NAME']);
    $_SERVER['SCRIPT_FILENAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_FILENAME']);
    
    Mage::app('admin')->setUseSessionInUrl(false);
    
    try {
    	Mage::getConfig()->init()->loadEventObservers('crontab');
    	Mage::app()->addEventArea('crontab');
    	Mage::dispatchEvent('default');
    	$ob = Mage::getModel('catalogrule/observer');
    	$ob->dailyCatalogUpdate("0 1 * * *");
    } catch (Exception $e) {
        Mage::printException($e);
    }
    ?>

    When I set a newsletter template and assign in queue, it showing ‘Not sent’ but when I run cron.php manually. after some time it showing ‘Sent’. But no any mail comes on subscribers email addresses.

    Anyone can do help me to retrieve this problem?

  25. I’ve tried everything and can’t get my newsletter to run. I have tried all sorts of times and I have pulled the file via the search bar. When I do that all I see is a white screen but no emails are sent. This is my cron file.

    require ‘app/Mage.php’;

    if (!Mage::isInstalled()) {
    echo “Application is not installed yet, please complete install wizard first.”;
    exit;
    }

    // Only for urls
    // Don’t remove this
    $_SERVER[‘SCRIPT_NAME’] = str_replace(basename(__FILE__), ‘index.php’, $_SERVER[‘SCRIPT_NAME’]);
    $_SERVER[‘SCRIPT_FILENAME’] = str_replace(basename(__FILE__), ‘index.php’, $_SERVER[‘SCRIPT_FILENAME’]);

    Mage::app(‘admin’)->setUseSessionInUrl(false);

    try {
    Mage::getConfig()->init()->loadEventObservers(‘crontab’);
    Mage::app()->addEventArea(‘crontab’);
    Mage::dispatchEvent(‘default’);
    } catch (Exception $e) {
    Mage::printException($e);
    }

    Any ideas here… I’m clueless but I need to send out emails. Thanks

  26. @Sigi,

    Set it in past. If your store is installed on the root of domain, just visit example.com/cron.php with your browser. If it’s not in root, add the folder where Magento is before /cron.php

    If this doesn’t work, there might be somethign wrong with your configuration.

  27. Hi Guys. Trying to send a newsletter for the first time. I cant seem to get it to work.
    The drop down box on the newsletter wueue only contains the option “preview”. I tried schedulng a send out both in future and past, but no newsletter gets sent.
    On the previous post it states that you may be able to kick off the cron job manually. Where is the cronid the url calls for? I know it must be something dumb I am doing because its my first time, but cant seem tget it to work.
    Any advice would be greatly appreciated.

  28. I think script runs multiple times when cron is activated, it sure isn’t sending 20 every 15 minutes, it’s sending more (even with default installation).

    However, I’m not a programmer so I can’t give you any answers from that perspective 🙂

  29. Ok, in the meantime I found out where the value is. Two locations:
    1)
    \app\Code\Core\Mage\Adminhtml\Controllers\Newslette\Queuecontroller.php
    Inside “public function sendingAction()” > $countOfSubscritions = 20;

    2)
    \app\Code\Core\Mage\Newsletter\Model\Observer.php
    Inside “public function scheduledSend($schedule)” > $countOfSubscritions = 20;

    So default limit is 20, which is a pretty conservative batch size. Good.
    Tonight cron was configured to run each 15 minutes. It ran two times, then I see no more “cron.php” entries in the server log.
    20 x 2 = 40 => Subscribers 1 to 40 should be marked “sent” in newsletter admin.
    Instead, Magento admin marks users 1 to ***300*** as sent. The mail server queue had 180 e-mails when it died.
    Do you agree that problem was probably cause by strange behaviour of cron.php? Did you experience anything wrong with it on your projects?
    Thanks!

  30. @Next,

    Not sure where the limit can be seen or configured in code, but I’m 100% positive that Magento will not send all e-mails at once.

  31. Toni, thanks for this tutorial. Can you explain where the “integrated limit on the number of emails it can send at once” is found?
    Tonight we scheduled an HTML newsletter with 470 subcribers, you know a very small group. Newsletter code was professionally created, all images external.
    To our surprise, Magento filled out the mail server to death.
    There really needs to make this “integrated limit” visible in the configuration. So the admin can choose a batch size compatible with available resources.

  32. If U give code and live demo how this newsletter Work So it’s more Better To Understand But this will also help full
    whatever, THANX

  33. @Toni Anicic
    Actually there is a start option in the drop down under the Action column. In our case it was’nt showing. Thats why we had to use this method..[:P]

  34. Hi,
    Yesterday we had a problem with sending client newsletter from magento. There was no start option underneath the action dropdown.We used a method to manually send the mails after the mail was queued in the newsletter queue. Just type http://yourdomain.com/newsletter_queue/sending/id/(queueid of newsletter) and press enter…;)…you may have to do this more than once to send to all recipients..hope this helps some one..

    Regards
    Anoop

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.

Tell us about your project

Drop us a line. We'd love to know more about your project.