Magento – Magento CE 1.9.1 send newsletter to test email address

newsletter

I am wanting to have the ability in the admin panel to send a newsletter to a test email address so I can see how it looks in different email clients. So I found a post that says to do the below. However my issue is it does not seem to work as once I add a newsletter to the queue I do not have any option to indicate it should go to a "test" email user.

the post I found said to
Go to /app/code/Mage/Newsletter/Model/Queue.php

Modify the method getSubscribersCollection() around line 126 to:

   $this->_subscribersCollection = Mage::getResourceModel('newsletter/subscriber_collection')
            ->addFieldToFilter('subscriber_email', 'your-test@email.com')
            ->useQueue($this);

Best Answer

First and foremost, ignore posts that tell you to modify code in app/code/core. This should only be done to quickly check if something would work, but Magento had an observer system and rewrite system that lets you modify its behavior without touching core code.

This particular code is a quick hack that assumes you have created a newsletter subscriber with the hardcoded e-mail address in the code, before you run it, so there's no way to configure that at runtime, you just have to create that customer first and subscribe her to the newsletter.

This also means, you cannot send actual newsletters from that system, so this is meant for a staging / test installation.

Related Topic