title: How to send new password from Magento CSV import of Customers
body: <p>We have been trying to modify the Customer.php file ( import/export ) to get it to send out the new account details automatically as it imports the customers from a CSV file.</p>
  
  <p>We are working in the right area as we dropped a simple mail() call which was called (we received the emails) for every new row. The problem arises when trying to get it to generate a new random password and send out the new account details - it never sends any mail and we cannot figure out why! Code follows ( Edited from app/code/local/Mage/ImportExport/Model/Import/Entity/Customer.php )</p>
  
  <pre><code> /**
   * Update and insert data in entity table.
   *
   * @param array $entityRowsIn Row for insert
   * @param array $entityRowsUp Row for update
   * @return Mage_ImportExport_Model_Import_Entity_Customer
   */
  protected function _saveCustomerEntity(array $entityRowsIn, array $entityRowsUp)
  {
      if ($entityRowsIn) {
          $this-&gt;_connection-&gt;insertMultiple($this-&gt;_entityTable, $entityRowsIn);
  
            // BEGIN: Send New Account Email          
            $cust = Mage::getModel('customer/customer');
            $cust-&gt;setWebsiteId(Mage::app()-&gt;getWebsite()-&gt;getId());              
            foreach($entityRowsIn as $idx =&gt; $u){
              // Failed
              $cust-&gt;loadByEmail($u['email']);
              $cust-&gt;setConfirmation(NULL);
              $cust-&gt;setPassword($cust-&gt;generatePassword(8));
              $cust-&gt;save();
              $cust-&gt;sendNewAccountEmail();
              //$cust-&gt;sendPasswordReminderEmail(); // this call doesnt work either
            }
            // END: Send New Account Email
  
      }
      if ($entityRowsUp) {
          $this-&gt;_connection-&gt;insertOnDuplicate(
              $this-&gt;_entityTable,
              $entityRowsUp,
              array('group_id', 'store_id', 'updated_at', 'created_at')
          );
      }
      return $this;
  }
  </code></pre>