本文整理汇总了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);
}
示例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());
}
示例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);
}
示例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);
}
示例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');
}
示例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);
}
示例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')));
}
示例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'));
}
示例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'));
}
示例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);
}
示例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();
}
示例12: __construct
public function __construct()
{
parent::__construct();
$this->setFrom(PropertyTable::get('company_email'), PropertyTable::get('company_name'));
}
示例13: __construct
public function __construct($engine, $parser)
{
$this->_engine = $engine;
$this->_parser = $parser;
parent::__construct();
}