0

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);
1

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.

  • ahh ok. Any suggestions on a modification of the above code to be able to create/edit a test email address from the admin panel side that would also not prevent use from sending a newsletter to the real subscriber list. – Jayreis Apr 13 '15 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.