Skip to content

Instantly share code, notes, and snippets.

@luizwbr
Last active May 29, 2018 17:43
Show Gist options
  • Save luizwbr/2b6d49b56c0f0c26f21a0d6688ededf3 to your computer and use it in GitHub Desktop.
Save luizwbr/2b6d49b56c0f0c26f21a0d6688ededf3 to your computer and use it in GitHub Desktop.
Send Welcome Emails Magento 1.9
<?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