I am trying to create API for customer signup. I works perfectly but now i need to add one more functionality. i want to sent customer confirmation mail when customer register. i have tried all but result are null.
$session = $client->login($apiuser, $apikey);
try{
$result = $client->call($session,'customer.create',array(array('email' => "$email", 'firstname' => "$firstname", 'lastname' => "$lastname", 'password' => "$password", 'website_id' => "$websiteId", 'store_id' => "$storeId", 'group_id' => 1)));
if($result){
$cust = Mage::getModel('customer/customer')->setWebsiteId(Mage::app()->getStore()->getWebsiteId())->loadByEmail($email);
$cust->sendNewAccountEmail('confirmed');
echo json_encode("New Customer created with Id-$result");
}
}
catch( Exception $e ) {
echo json_encode($e->getMessage());
}
My above code create customer successfully but not work for mail confirmation.