__construct() 공개 메소드

Details may be optionally passed into the constructor.
public __construct ( string $subject = null, string $body = null, string $contentType = null, string $charset = null )
$subject string
$body string
$contentType string
$charset string
    /**
     * 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
0
파일: Message.php 프로젝트: ajaboa/crmpuan
 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());
 }
    /**
     * 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);
    }
    /**
     * 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);
    }
  public function __construct($subject = null, $body = null)
  {
    
    parent::__construct($subject, $body);
 
    // set all shared headers
    $this->setFrom( array('*****@*****.**' => 'Downtownswing') );
    $this->setSender('*****@*****.**');
    $this->setReturnPath('*****@*****.**');
    
  }
예제 #6
0
    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('*****@*****.**' => 'Robot de gesCorreo'));
        $this->setTo($emailTo);
    }
예제 #7
0
 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
0
 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('*****@*****.**' => 'yourdomain.com'));
     $this->setTo(array('*****@*****.**' => 'Your Name'));
 }
예제 #9
0
    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
0
 /**
  * @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
0
 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
0
 public function __construct()
 {
     parent::__construct();
     $this->setFrom(PropertyTable::get('company_email'), PropertyTable::get('company_name'));
 }
예제 #13
0
 public function __construct($engine, $parser)
 {
     $this->_engine = $engine;
     $this->_parser = $parser;
     parent::__construct();
 }