public static function sendDefault($obj) { //---------------------------------------------------------- //init var //---------------------------------------------------------- $chk = array("bool" => true, "traceID" => "sendDefault"); $emailObj; //---------------------------------------------------------- GenFun::errorKey_CHK($obj, array("emailTo", "message")); //---------------------------------------------------------- $message = '<div style = "padding:20px; width:500px; background-color:#999999; font-family: arial; font-size:12px; color: #FFFFFF;">'; $message .= $obj['message'] . ' <br><br>'; //---------------------------------------------------------- if (!is_null($obj['link'])) { $message .= '<a href = "' . $obj['link'] . '">' . $obj['linkTxt'] . '</a>'; } //---------------------------------------------------------- $message .= '</div>'; $message = GenFun::html($message); $emailObj = array("emailTo" => $obj['emailTo'], "nameFrom" => GlobalMas::$name, "emailFrom" => GlobalMas::$email, "message" => $message, "subject" => $obj['subject']); //---------------------------------------------------------- $chk = $chk["bool"] ? SendEmail_v0::go($emailObj) : $chk; //---------------------------------------------------------- return $chk; }
public function sendLink($email, $message, $url) { Trace::output($this->traceID, "sendLink"); //---------------------------------------------------------- //init var //---------------------------------------------------------- $chk = array("bool" => true, "traceID" => "sendLink"); //---------------------------------------------------------- $chk = GenFun::error_CHK($obj); //---------------------------------------------------------- $emailObj = array("emailTo" => $email, 'link' => "http://awwthentic.com/Modules/DOM/uber_src/server/werm/services/Download.php?url={$url}", 'linkTxt' => "Click here to download file.", "message" => $message, "subject" => $subject = $obj['sender'] . " sent you a file!!!"); //---------------------------------------------------------- if ($chk['bool']) { $chk = SendEmail_v0::sendDefault($emailObj); } else { return $chk; } //---------------------------------------------------------- if ($chk['bool']) { $chk['message'] = "Email was successfully sent to {$email}"; } //---------------------------------------------------------- return $chk; }
public function emailForgotLink($linkHash) { Trace::output($this->traceID, "emailForgotLink"); //---------------------------------------------------------- //init var //---------------------------------------------------------- $chk = array("bool" => true, "traceID" => "emailForgotLink"); $emailObj; //---------------------------------------------------------- $message = '<div style = "padding:20px; width:500px; background-color:#999999; height:160px;font-family: arial; font-size:12px; color: #FFFFFF;">'; $message .= 'Forgot password? Click link below to create a new one: <br><br>'; $message .= '<a href = "' . $this->forgot_url . '?hash=' . $linkHash . '">Create new password</a></div>'; $message = GenFun::html($message); $emailObj = array("emailTo" => $this->email, "nameFrom" => Constants::NAME, "emailFrom" => Constants::EMAIL, "message" => $message, "subject" => "account registration"); //---------------------------------------------------------- $chk = $chk["bool"] ? SendEmail_v0::go($emailObj) : $chk; //---------------------------------------------------------- return $chk; }
public function emailForgotLink($linkHash) { Trace::output($this->traceID, "emailForgotLink"); //---------------------------------------------------------- //init var //---------------------------------------------------------- $chk = array("bool" => true, "traceID" => "emailForgotLink"); $emailObj; //---------------------------------------------------------- $smarty = Smarty::getSmarty(); $smarty->assign('forgot_url', Account_v0::$forgot_url); $smarty->assign('linkHash', $linkHash); $message = $smarty->fetch('forgot.tpl'); //---------------------------------------------------------- $emailObj = array("emailTo" => $this->email, "nameFrom" => Constants::$name, "emailFrom" => Constants::$email, "message" => $message, "subject" => "account registration"); //---------------------------------------------------------- $chk = $chk["bool"] ? SendEmail_v0::go($emailObj) : $chk; //---------------------------------------------------------- return $chk; }
private function sendConfirmation($email, $categoryID, $linkHash, $type) { Trace::output($this->traceID, "sendConfirmation"); //---------------------------------------------------------- //init var //---------------------------------------------------------- $chk = array("bool" => true, "traceID" => "sendConfirmation"); $emailObj; $typeofs = $type == 0 ? 'terminate your subscription' : 'subscribe'; //---------------------------------------------------------- $message = '<div style = "padding:20px; width:500px; background-color:#999999; height:160px;font-family: arial; font-size:12px; color: #FFFFFF;">'; $message .= 'This message was sent with the intention of verifiying your request to ' . $typeofs . ' to the following list: <br><br>'; $message .= '<b>"' . strtoupper($this->categoryName) . '"</b><br><br> To confirm, please click the link below: <br><br>'; $message .= '<a href = "http://awwthentic.com/Modules/DOM/examples/form/form_v2/confirmation.php?hash=' . $linkHash . '">click here to complete process</a></div>'; $message = GenFun::html($message); $emailObj = array("emailTo" => $email, "nameFrom" => GlobalMas::NAME, "emailFrom" => GlobalMas::EMAIL, "message" => $message, "subject" => "mailinglist registration"); //---------------------------------------------------------- $chk = $chk["bool"] ? SendEmail_v0::go($emailObj) : $chk; //---------------------------------------------------------- if ($chk["bool"]) { return $chk; } }
public function sendLink($obj, $url, $fileName) { Trace::output($this->traceID, "sendLink"); //---------------------------------------------------------- //init var //---------------------------------------------------------- $chk = array("bool" => true, "traceID" => "sendLink"); //---------------------------------------------------------- GlobalMas::$name = $obj['from']; //---------------------------------------------------------- $message = $obj['from'] . " sent you a file!!!"; //---------------------------------------------------------- if ($obj['message'] != "") { $message .= "<br><br>" . $obj['message']; } $emailObj = array("emailTo" => $obj['email'], 'link' => $url, 'linkTxt' => $fileName, "message" => $message, "subject" => $subject = $obj['from'] . " sent you a file!!!"); //---------------------------------------------------------- if ($chk['bool']) { $chk = SendEmail_v0::sendDefault($emailObj); } else { return $chk; } //---------------------------------------------------------- if ($chk['bool']) { $chk['message'] = "Email was successfully sent to " . $obj['email']; } //---------------------------------------------------------- return $chk; }
public function inviteConfirmationLink($email, $hash) { Trace::output($this->traceID, "inviteConfirmationLink"); //---------------------------------------------------------- //init var //---------------------------------------------------------- $chk = array("bool" => true, "traceID" => "inviteConfirmationLink"); $emailObj; //---------------------------------------------------------- $message = '<div style = "padding:20px; width:500px; background-color:#999999; line-height:17px; height:100px;font-family: arial; font-size:15px; color: #FFFFFF;">'; $message .= 'You have been invited by <a href = "http://www.awwthentic.com/Modules/DOM/examples/sites/pmbl/confirmation.php">"' . GlobalMas::$loggedIN['first'] . ' ' . GlobalMas::$loggedIN['last'] . '"</a> to participate in a <br> ' . $this->eventObj['name'] . ' tournament on ' . $this->eventObj['dateWritten'] . ' for a grand prize of $' . number_format($this->eventObj['prize']) . '<br><br>'; $message .= '<a href = "http://www.awwthentic.com/Modules/DOM/examples/sites/pmbl/event_invite.php?hash=' . $hash . '">Click Here to accept invite</a></div>'; $message = GenFun::html($message); $emailObj = array("emailTo" => $email, "nameFrom" => GlobalMas::NAME, "emailFrom" => GlobalMas::EMAIL, "message" => $message, "subject" => "account registration"); //---------------------------------------------------------- $chk = $chk["bool"] ? SendEmail_v0::go($emailObj) : $chk; //---------------------------------------------------------- return $chk; }
public function sendLink($obj) { Trace::output($this->traceID, "sendLink"); //---------------------------------------------------------- //init var //---------------------------------------------------------- $chk = array("bool" => true, "traceID" => "sendLink"); //---------------------------------------------------------- //$arr = explode("#v-", $obj['url']); //---------------------------------------------------------- $chk = GenFun::error_CHK($obj); //---------------------------------------------------------- $chk = InsertInto::go('suggestions', array('hash' => $obj['hash'], 'sender' => $obj['sender'], "broken" => $obj['broken'], "subject" => $subject, 'message' => $obj['message'])); //---------------------------------------------------------- if (!empty($chk['duplicate'])) { $chk['message'] = "This video has already been suggested to you by '" . $chk["duplicate"]['result'][0]["sender"] . "'."; } //---------------------------------------------------------- $emailObj = array("emailTo" => GlobalMas::EMAIL, 'link' => $obj['url'] . "?suggestion_id=" . GlobalMas::$mysqli->insert_id, 'linkTxt' => "Click here to see video", "message" => $obj['message'], "subject" => $subject = $obj['sender'] . " sent you a youtube link!!!"); //---------------------------------------------------------- if ($chk['bool']) { $chk = SendEmail_v0::sendDefault($emailObj); } else { return $chk; } //---------------------------------------------------------- if ($chk['bool']) { $chk = GenFun::errorKey_CHK($obj, array("url", "sender")); } else { return $chk; } //---------------------------------------------------------- if ($chk['bool']) { $chk['message'] = "Link was successfully sent to Wilmer"; } //---------------------------------------------------------- if ($chk['bool']) { $this->resetQueries(); } //---------------------------------------------------------- return $chk; }