Last active
May 29, 2018 17:43
-
-
Save luizwbr/2b6d49b56c0f0c26f21a0d6688ededf3 to your computer and use it in GitHub Desktop.
Send Welcome Emails Magento 1.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('app/Mage.php'); | |
ini_set('display_errors', 1); | |
Mage::app('admin'); | |
$user_ids = array(1,2,3,4); | |
foreach ($user_ids as $id) { | |
$customer = Mage::getModel('customer/customer')->load($id); | |
$storeId = $customer->getSendemailStoreId(); | |
$customer->setPassword($customer->getUsername()); | |
$customer->sendNewAccountEmail('registered', '', $storeId); | |
echo "E-mail sent to ".$customer->getEmail(); | |
echo "<br/>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment