public function send() { if (!isset($this->to) or !isset($this->subject) or !isset($this->body)) { return false; } if (Config::get('email.type') == 'postmark') { return Postmark::send(array('From' => Config::get('email.from'), 'To' => $this->to, 'Subject' => $this->subject, 'HtmlBody' => $this->body)); } }
<?php require "_postmark.php"; $postmark = new Postmark("APIKEY", "xx", 'xx'); $result = $postmark->to("*****@*****.**")->subject(time() . " has made an order from your cask site")->plain_message("This is a plain text message.")->send(); if ($result) { print "sent"; }
} else { $registration = FALSE; } } catch (Sentry\SentryException $e) { $errors = $e->getMessage(); Session::flash('error', $e->getMessage()); $registration = FALSE; } } else { return Xysti::error(500, 'Unknown authentication driver.'); } // Registration was a success if ($registration) { // User activation email.. if (0) { $postmark = new Postmark(); $postmark->to(); $postmark->subject('Chim chim on the loose again'); $postmark->txt_body('Hey Speed, Please keep Spritle and Chim chim in line. Love, Racer X.'); $response = $postmark->send(); } if (function_exists('registration_callback')) { return registration_callback(); } return Xysti::success_redirect(); // Registration failed.. } else { Session::flash('warning', 'Registration failed'); } return Xysti::make(); }));