ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.129.70.93 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/nicnAdmin/vendor/laravel/framework/src/Illuminate/Mail/Transport/ |
Upload File : |
<?php namespace Illuminate\Mail\Transport; use Swift_Mime_Message; use GuzzleHttp\ClientInterface; class MandrillTransport extends Transport { /** * Guzzle client instance. * * @var \GuzzleHttp\ClientInterface */ protected $client; /** * The Mandrill API key. * * @var string */ protected $key; /** * Create a new Mandrill transport instance. * * @param \GuzzleHttp\ClientInterface $client * @param string $key * @return void */ public function __construct(ClientInterface $client, $key) { $this->client = $client; $this->key = $key; } /** * {@inheritdoc} */ public function send(Swift_Mime_Message $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); $data = [ 'key' => $this->key, 'to' => $this->getToAddresses($message), 'raw_message' => $message->toString(), 'async' => false, ]; if (version_compare(ClientInterface::VERSION, '6') === 1) { $options = ['form_params' => $data]; } else { $options = ['body' => $data]; } return $this->client->post('https://mandrillapp.com/api/1.0/messages/send-raw.json', $options); } /** * Get all the addresses this message should be sent to. * * Note that Mandrill still respects CC, BCC headers in raw message itself. * * @param \Swift_Mime_Message $message * @return array */ protected function getToAddresses(Swift_Mime_Message $message) { $to = []; if ($message->getTo()) { $to = array_merge($to, array_keys($message->getTo())); } if ($message->getCc()) { $to = array_merge($to, array_keys($message->getCc())); } if ($message->getBcc()) { $to = array_merge($to, array_keys($message->getBcc())); } return $to; } /** * Get the API key being used by the transport. * * @return string */ public function getKey() { return $this->key; } /** * Set the API key being used by the transport. * * @param string $key * @return string */ public function setKey($key) { return $this->key = $key; } }