当前位置: 首页>>代码示例>>PHP>>正文


PHP Swift_Message::__construct方法代码示例

本文整理汇总了PHP中Swift_Message::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Swift_Message::__construct方法的具体用法?PHP Swift_Message::__construct怎么用?PHP Swift_Message::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Swift_Message的用法示例。


在下文中一共展示了Swift_Message::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

    /**
     * Construct.
     *
     * @param string $message
     * @param string $reference
     */
    public function __construct($message, $reference)
    {
        parent::__construct();
        $body = <<<EOF
An error occurred while trying to send email: {$reference}
{$message}
EOF;
        $this->setSubject('An exception occurred')->setBody($body);
    }
开发者ID:anhnt0212,项目名称:LexikMailerBundle,代码行数:15,代码来源:UndefinedVariableMessage.php

示例2: __construct

 public function __construct($subject = null, $body = null, $contentType = null, $charset = null)
 {
     parent::__construct($subject, $body, $contentType, $charset);
     $headers = $this->getHeaders();
     $headers->addTextHeader("User-Agent", GO::config()->product_name);
     //Override qupted-prinatble encdoding with base64 because it uses much less memory on larger bodies. See also:
     //https://github.com/swiftmailer/swiftmailer/issues/356
     $this->setEncoder(new \Swift_Mime_ContentEncoder_Base64ContentEncoder());
 }
开发者ID:ajaboa,项目名称:crmpuan,代码行数:9,代码来源:Message.php

示例3: __construct

    /**
     * Construct.
     *
     * @param string $reference
     * @param string $file
     * @param string $line
     */
    public function __construct($reference, $file, $line)
    {
        parent::__construct();
        $body = <<<EOF
An error occurred while trying to send an email.
You tried to use a reference that does not exist : "{$reference}"
in "{$file}" at line {$line}
EOF;
        $this->setSubject('An exception occurred')->setBody($body);
    }
开发者ID:anhnt0212,项目名称:LexikMailerBundle,代码行数:17,代码来源:ReferenceNotFoundMessage.php

示例4: __construct

    /**
     * Construct
     *
     * @param string $reference
     * @param string $locale
     */
    public function __construct($reference, $locale)
    {
        parent::__construct();
        $body = <<<EOF
You have sent an email in the wrong language.
Reference : {$reference}
Language: {$locale}
EOF;
        $this->setSubject('An exception occurred')->setBody($body);
    }
开发者ID:anhnt0212,项目名称:LexikMailerBundle,代码行数:16,代码来源:NoTranslationMessage.php

示例5: __construct

  public function __construct($subject = null, $body = null)
  {
    
    parent::__construct($subject, $body);
 
    // set all shared headers
    $this->setFrom( array('info@downtownswing.ch' => 'Downtownswing') );
    $this->setSender('info@downtownswing.ch');
    $this->setReturnPath('info@downtownswing.ch');
    
  }
开发者ID:romankallweit,项目名称:swingmachine,代码行数:11,代码来源:dsEmailMessage.class.php

示例6: __construct

    public function __construct($asunto, $cuerpo, $emailTo)
    {
        $cuerpo .= <<<EOF
--

Email enviado por el Robot de gesCorreo
EOF;
        parent::__construct($asunto, $cuerpo);
        // añadir todas las cabeceras comunes
        $this->setFrom(array('correo@upr.edu.cu' => 'Robot de gesCorreo'));
        $this->setTo($emailTo);
    }
开发者ID:rafix,项目名称:gesCorreo,代码行数:12,代码来源:ProjectBaseMessage.class.php

示例7: __construct

 public function __construct($subject, $body, $content_type = 'text/html')
 {
     /*
         $body .= <<<EOF
     --
     
     Email sent by Cap Sciences
     EOF
         ;
     */
     parent::__construct($subject, $body, $content_type);
     // set all shared headers
     $this->setFrom(array(sfConfig::get('app_default_from') => sfConfig::get('app_default_from_name')));
 }
开发者ID:pmoutet,项目名称:navinum,代码行数:14,代码来源:ApiBaseMessage.php

示例8: __construct

 public function __construct($cartitems)
 {
     $subject = "Paypal Order Request";
     $body = "A order has been checked out to Paypal.  The payment has not yet been processed by Paypal.\n\r";
     $body = "You will receive a notice from Paypal if and when the customer makes his payment.\n\r";
     $body .= "-------------------------------------------------\n\r";
     $body .= "Cart Items:\n\r";
     $total = 0;
     foreach ($cartitems as $cartitem) {
         $total = $total + $cartitem['subtotal'];
         $body .= $cartitem['qty'] . "  x  " . $cartitem['name'] . "  @  \$" . $cartitem['price'] . "\n\r";
     }
     $body .= "-------------------------------------------------\n\r";
     $body .= "Total:\t \$" . $total . "\n\r";
     parent::__construct($subject, $body);
     $this->setFrom(array('mailer@yourdomain.com' => 'yourdomain.com'));
     $this->setTo(array('yourname@yourdomain.com' => 'Your Name'));
 }
开发者ID:richhl,项目名称:sfCartPlugin,代码行数:18,代码来源:OrderMessage.class.php

示例9: __construct

    public function __construct($issue, $body)
    {
        $routing = sfContext::getInstance()->getRouting();
        $issue_url = $routing->generate('issues_show', $issue, true);
        $subject = "Amaranto issue #{$issue->id}: {$issue->title}";
        $body .= <<<EOF


Id: {$issue->id}
Title: {$issue->title}
Project: {$issue->Project}
Priority: {$issue->Priority}
Opened by: {$issue->OpenedBy}

You can see this issue at: {$issue_url}

EOF;
        parent::__construct($subject, $body);
        $this->setFrom(sfConfig::get('app_email_address'));
    }
开发者ID:jackbravo,项目名称:amaranto,代码行数:20,代码来源:IssueBaseMessage.class.php

示例10: __construct

 /**
  * @param null $subject
  * @param null $body
  * @param null $contentType
  * @param null $charset
  */
 public function __construct($subject = null, $body = null, $contentType = null, $charset = null)
 {
     parent::__construct($subject, $body, $contentType, $charset);
 }
开发者ID:kp-favorite,项目名称:bitfalls_utils,代码行数:10,代码来源:BitfallsMessage.php

示例11: __construct

 public function __construct($subject = null, $body = null, $contentType = null, $charset = null)
 {
     // Call the parent constructor.
     parent::__construct($subject, $body, $contentType, $charset);
     // Set the Beehive specific headers
     $this->set_headers();
 }
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:7,代码来源:swift.inc.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setFrom(PropertyTable::get('company_email'), PropertyTable::get('company_name'));
 }
开发者ID:solutema,项目名称:siwapp-sf1,代码行数:5,代码来源:EmailMessages.php

示例13: __construct

 public function __construct($engine, $parser)
 {
     $this->_engine = $engine;
     $this->_parser = $parser;
     parent::__construct();
 }
开发者ID:mothership-ec,项目名称:cog,代码行数:6,代码来源:Message.php


注:本文中的Swift_Message::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。