function __construct(\Swift_Mailer $mailer, $to, $from = null) { parent::__construct(); $this->mailer = $mailer; $this->from = $from ?: $to; $this->to = $to; }
/** * @param string|array $to The receiver of the mail * @param string $subject The subject of the mail * @param string $from The sender of the mail * @param integer $level The minimum logging level at which this handler will be triggered * @param boolean $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true) { parent::__construct($level, $bubble); $this->to = is_array($to) ? $to : array($to); $this->subject = $subject; $this->addHeader(sprintf('From: %s', $from)); }
/** * @param string|array $to The receiver of the mail * @param string $subject The subject of the mail * @param string $from The CakeEmail configuration to use * @param integer $level The minimum logging level at which this handler will be triggered * @param boolean $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($to, $subject, $config = 'default', $level = Logger::ERROR, $bubble = true) { parent::__construct($level, $bubble); $this->_to = $to; $this->_subject = $subject; $this->_config = $config; }
/** * @param string $to The receiver of the mail * @param string $subject The subject of the mail * @param string $from The sender of the mail * @param integer $level The minimum logging level at which this handler will be triggered * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true) { parent::__construct($level, $bubble); $this->to = $to; $this->subject = $subject; $this->headers = sprintf("From: %s\r\nContent-type: text/plain; charset=utf-8\r\n", $from); }
/** * Set the basics of emails - $to, $subject, $from * Note that $from must be a verified email or domain * This can be done on the aws control panel or AmazonSES->verify_email_address * Also you must have SES in production, or $to must also be verified. * * For the $sesClient pass a a ready SesClient, depending ony your setup * More info http://docs.aws.amazon.com/aws-sdk-php/guide/latest/service-ses.html * * @param string|array $to The receiver of the mail * @param string $subject The subject of the mail * @param string $from The sender of the mail * @param SesClient $sesClient The Ses client * @param integer $level The minimum logging level at which this handler will be triggered * @param boolean $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($to, $subject, $from, SesClient $sesClient, $level = Logger::DEBUG, $bubble = true) { parent::__construct($level, $bubble); $this->to = is_array($to) ? $to : [$to]; $this->from = $from; $this->subject = $subject; $this->ses = $sesClient; }
/** * @param string $to * @param string $subject {{Level}} will be replaced with the log level of the message * @param string $from * @param integer $level The minimum logging level at which this handler will be triggered * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true) { $this->to = $to; $this->subject = $subject; $this->from = $from; parent::__construct($level, $bubble); $this->setFormatter(new HtmlFormatter()); }
/** * @param string $username CPSMS API username * @param string $password CPSMS API password * @param string|array $to The receiver of the SMS * @param string $from The sender of the SMS * @param integer $level The minimum logging level at which this handler will be triggered * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($username, $password, $to, $from, $level = Logger::CRITICAL, $bubble = true) { parent::__construct($level, $bubble); $this->username = $username; $this->password = $password; $this->to = $to; $this->from = $from; }
/** * @param string|array $to The receiver of the mail * @param string $subject The subject of the mail * @param string $from The sender of the mail * @param int $level The minimum logging level at which this handler will be triggered * @param bool $bubble Whether the messages that are handled can bubble up the stack or not * @param int $maxColumnWidth The maximum column width that the message lines will have */ public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true, $maxColumnWidth = 70) { parent::__construct($level, $bubble); $this->to = (array) $to; $this->subject = $subject; $this->addHeader(sprintf('From: %s', $from)); $this->maxColumnWidth = $maxColumnWidth; }
/** * @param string $apiUser The SendGrid API User * @param string $apiKey The SendGrid API Key * @param string $from The sender of the email * @param string|array $to The recipients of the email * @param string $subject The subject of the mail * @param int $level The minimum logging level at which this handler will be triggered * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct(string $apiUser, string $apiKey, string $from, $to, string $subject, int $level = Logger::ERROR, bool $bubble = true) { parent::__construct($level, $bubble); $this->apiUser = $apiUser; $this->apiKey = $apiKey; $this->from = $from; $this->to = (array) $to; $this->subject = $subject; }
/** * @param \Swift_Mailer $mailer The mailer to use * @param callback|\Swift_Message $message An example message for real messages, only the body will be replaced * @param integer $level The minimum logging level at which this handler will be triggered * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true) { parent::__construct($level, $bubble); $this->mailer = $mailer; if (!$message instanceof \Swift_Message && is_callable($message)) { $message = call_user_func($message); } if (!$message instanceof \Swift_Message) { throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callback returning it'); } $this->message = $message; }
public function __construct($to, $subject, $from, $token, $domain, $level = Logger::CRITICAL, $bubble = true, $host = 'api.mailgun.net', $version = 'v3') { if ($version !== 'v3') { throw new Exception("Version '{$version}' is not supported"); } $this->to = $to; $this->subject = $subject; $this->from = $from; $this->host = $host; $this->version = $version; $this->domain = $domain; $this->token = $token; parent::__construct($level, $bubble); }
/** * Mail constructor. * @param int $address * @param bool|int $level * @param bool|true $bubble */ public function __construct($address, $level = Logger::DEBUG, $bubble = true) { $this->address = $address; parent::__construct($level, $bubble); }
/** * @param string|array $to The receiver of the mail * @param string $subject The subject of the mail * @param integer $level The minimum logging level at which this handler will be triggered * @param boolean $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($to, $subject, $level = Logger::ERROR, $bubble = true) { parent::__construct($level, $bubble); $this->to = is_array($to) ? $to : array($to); $this->subject = $subject; }
public function __construct(ProviderInterface $provider, $level = Logger::CRITICAL, $bubble = true) { parent::__construct($level, $bubble); $this->provider = $provider; }
/** * @param WorkerInterface $worker * @param MailCommandInterface $command * @param int $level * @param bool $bubble */ public function __construct(WorkerInterface $worker, MailCommandInterface $command, $level = Logger::ERROR, $bubble = true) { $this->worker = $worker; $this->command = $command; parent::__construct($level, $bubble); }
/** * @param \Swift_Mailer $mailer The mailer to use * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced * @param integer $level The minimum logging level at which this handler will be triggered * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true) { parent::__construct($level, $bubble); $this->mailer = $mailer; $this->messageTemplate = $message; }
/** * @param \Enlight_Components_Mail $mailer The mailer to use * @param bool|int $level The minimum logging level at which this handler will be triggered * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct(\Enlight_Components_Mail $mailer, $level = Logger::ERROR, $bubble = true) { parent::__construct($level, $bubble); $this->mailer = $mailer; }