email - Magento mailing feature in custom script -


i have created custom script import bulk number of customers magento database. client needed each 100 customers import needed mail whats going on , status of importing.

so how can use magento mailing functionality can create template send mail magento does. please me

i think you're looking along following lines:

$store_id = $this->getstoreid(); $template = "import_script_email_template_name";  $from =  mage::getstoreconfig(self::xml_path_email_identity, $store_id); $to = array( "name" => "nick", "email" => "the@email.address" );  $template_variables = array(     "var1" => "somevalue",     "var2" => "someothervalue" );   $mail = mage::getmodel("core/email_template"); $mail->setdesignconfig( array( "area" => "frontend", "store" => $store_id ))      ->sendtransactional(          $template_name,          $from,          $to["email"],          $to["name"],          $template_variables      ); 

note: lifted mage_sales_model_order::sendneworderemail() , hasn't been tested, should more enough started. treat pseudo-code :)


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -