Analyze the email template settings in magento

Source: Internet
Author: User

Public Function send ()
{
$ Emailtemplate = Mage: GetModel ('Core/email_template ');
// Send all emails from corresponding list
While (! Empty ($ this-> _ emailinfos )){
$ Emailinfo = array_pop ($ this-> _ emailinfos );
// Handle "BCC" policients of the current email
$ Emailtemplate-> addbcc ($ emailinfo-> getbccemails ());
// Set required design parameters and delegate email sending to mage_core_model_email_template
$ Emailtemplate-> setdesignconfig (Array ('area '=> 'frontend', 'store' => $ this-> getstoreid ()))
-> Sendtransactional (
$ This-> gettemplateid (),
$ This-> getsender (),
$ Emailinfo-> gettoemails (),
$ Emailinfo-> gettonames (),
$ This-> gettemplateparams (),
$ This-> getstoreid ()
);
}
Return $ this;
}

(1) $ this-> gettemplateid ()

<Global>

<Template>
<Email>
<Customer_create_account_email_template translate = "label" module = "customer">
<Label> New Account </label>
<File> account_new.html </File>
<Type> HTML </type>
</Customer_create_account_email_template>

</Email>

/ span>

$ This-> gettemplateid () indicatesCustomer_create_account_email_template.

(2) $ this-> getstoreid ()

The system will$ This-> getstoreid ()To call different mail templates under locale. By default, the APP/locale/en_us/template/EmailEmail template

(3) $ this-> gettemplateparams ()

the variables in the email template all come from this

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.