Exemplo n.º 1
0
 /**
  * @param      $addresses
  * @param bool $syntaxOnly
  *
  * @return mixed
  */
 public function parse($addresses, $syntaxOnly = true)
 {
     $this->mailgun = new Mg(Config::get('mailgun::public_api_key'));
     if (is_array($addresses)) {
         $addresses = implode(',', $addresses);
     }
     if ($syntaxOnly === true) {
         $syntaxOnly = 'true';
     } else {
         $syntaxOnly = 'false';
     }
     $data = $this->mailgun->get("address/parse", array('addresses' => $addresses, 'syntax_only' => $syntaxOnly));
     return $data->http_response_body;
 }
Exemplo n.º 2
0
 /**
  * Queue a new e-mail message for sending after (n) seconds/minutes/hours/days.
  *
  * @param int|string|array $time
  * @param string|array $view
  * @param array $data
  * @param \Closure|string $callback
  * @return object Mailgun response containing http_response_body and http_response_code
  * @static 
  */
 public static function later($time, $view, $data, $callback)
 {
     return \Bogardo\Mailgun\Mailgun::later($time, $view, $data, $callback);
 }