public static function sendException($file, $message, $trace) { $body = "<html><body>\n"; $body .= "<h3>{$file}</h3><p>{$message}</p><p><pre>{$trace}</pre></p>"; $body .= "</body></html>\n"; $alt = strip_tags($body); $creds = ["from" => self::getWebmasterEmail(), "name" => self::getWebmasterEmail(), "reply" => self::getWebmasterEmail(), "subject" => ENV . '-' . CShell::id() . " Webinar Error", "category" => CShell::id()]; SystemTool::sendEmail($creds, SystemTool::getWebmasterEmail(), $body, $alt); }
private function send_exception($file, $message, $trace) { $body = "<html><body>\n"; $body .= "<h2>{$file}</h2><br/><p>{$message}</p><br/><p><pre>{$trace}</pre></p>"; $body .= "</body></html>\n"; $alt = strip_tags($body); $creds = ["from" => "*****@*****.**", "name" => "Casey Research", "reply" => "*****@*****.**", "subject" => "Casey Research Link Server Error", "category" => "Link Server Error"]; SystemTool::sendEmail($creds, SystemTool::getWebmasterEmail(), $body, $alt); }
public function refer() { $this->setCache(false); $this->_return = self::PROCESS; $backto = ''; if (isset($_POST["backto"])) { $backto = $_POST["backto"]; } $from = ''; if (isset($_POST["from"])) { $from = $_POST["from"]; } //Sanitize for base 64 $sender = base64_decode(SystemTool::sanitize($_COOKIE[SystemTool::getCookieName()], 1)); //Sanitize for email $sender = SystemTool::sanitize($sender, 2); //Is it a valid email? If not back to refer page. if (!SystemTool::validate($sender)) { header("Location: " . PageTool::getSiteRoot() . $backto); exit; } $success = 0; $emails = explode(",", $_POST["email"]); foreach ($emails as $email) { $email = SystemTool::sanitize($email, 2); if (SystemTool::validate($email)) { $WRM = new Webinar_referModel(); $WRM->addRecord(CShell::webinar_id(), $email, SystemTool::getTimestamp()); //Set up and render the email HTML. $eTemplate = new Template('email_share'); if ($from == "cr") { $eTemplate->set('cr', true); } $body = $eTemplate->render(false); $body = str_replace("!!EMAIL!!", $sender, $body); $alt = strip_tags($body); //Send the email. $PHPEmails = CShell::emails(); $PHPEmails["refer"]["subject"] = 'An invitation from ' . $sender . ' - The Street Gold Event'; SystemTool::sendEmail($PHPEmails["refer"], $email, $body, $alt); $success = 1; } } if ($success) { setcookie(CShell::REFER, '1', PageTool::getCookieLength(), CShell::cookiePath(), CShell::cookieDomain()); // 1yr cookie header('Location: /' . $backto); exit; } else { header('Location: /' . $backto . '?e=no'); exit; } }