• 调magento自定义模板发邮件


    1. 设置邮件模板

      <global>

        <template>

          <email>

            <custom_email_template1 module="SampleModule1">

              <label>ActiveCodeline custom email module</label>

              <file>activecodeline_custom_email1.html</file>

              <type>html</type>

            </custom_email_template1>

          </email>

        </template>

      </global>

    2. 自定义模板内容  

      <div>     

        <h1>ActiveCodeline custom email example by Branko Ajzele</h1>

        <p>Hi there {{var myvar1}} {{var myvar2}} from {{var myvar3}}. This is just some example template to test custom email module.</p>

      </div>

    3.发送邮件

      $templateVars['myvar1']='Branko';

      $templateVars['myvar2']='Ajzele';

      $templateVars['myvar3']='ActiveCodeline';  

      $emailTemplate  = Mage::getModel('core/email_template');

      
    $emailTemplate->sendTransactional(
      'custom_email_template1',
      array(
      'name'=>'senderName',
      'email'=>'senderEmail'
       ),
      $receiverEmail,
      '251mall',
      $templateVars
      );

      

    作者:冯亮
             
    能力有限,水平一般。如有错误,欢迎指正
  • 相关阅读:
    linux下的make命令
    安装pytorch
    CondaError: Downloaded bytes did not match Content-Length
    cv2.VideoCapture(0)
    cv2.imread(),cv2.imshow(),cv2.imwrite()
    unsqueeze()和squeeze()
    django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module
    Can't connect to MySQL server on '127.0.0.1' (10061)
    ping ip
    _vimrc配置
  • 原文地址:https://www.cnblogs.com/fengliang/p/4087283.html
Copyright © 2020-2023  润新知