1

Using this code i have create new customer and also it will login

$customerFactory = $objectManager->get('\Magento\Customer\Model\CustomerFactory');
$websiteId = $storeManager->getWebsite()->getWebsiteId();
$store = $storeManager->getStore();
$storeId = $store->getStoreId();

$customer = $customerFactory->create();
$customer->setWebsiteId($websiteId); 
$customer->setEmail($user_e); 
$customer->setFirstname($_fname); 
$customer->setLastname($_lname);

$customer->setPassword($pass);
$customer->save();

$CustomerModel->setWebsiteId($websiteId);
$CustomerModel->loadByEmail($user_e);   
$customerSession = $objectManager->create('Magento\Customer\Model\Session');
$customerSession->setCustomerAsLoggedIn($CustomerModel);

Now i want to send create account email, above script is not sending create account email.

How can i send create account email? Please Reply as soon as

Your Answer

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

Browse other questions tagged or ask your own question.