prepare($sql) or die(wac_log(__FILE__, __LINE__, $sql . '::' . $mysqli->error, 'Error please call '._PHONE)); $stmt->bind_param('s', base64_decode($_POST["t"])); $stmt->execute(); $stmt->store_result(); if ($stmt->num_rows == 0) { $stmt->close(); $sql = "insert into mailing_list (email,name) values (?,?)"; $stmt = $mysqli->prepare($sql) or die(wac_log(__FILE__, __LINE__, $sql . '::' . $mysqli->error, 'Error please call '._PHONE)); $stmt->bind_param('ss', base64_decode($_POST["t"]),base64_decode($_POST["o"])); $stmt->execute(); $stmt->close(); } $mysqli->close(); ?>

Your subscription has been activated. Thank you.

Thank you for subscribing to the "._TITLE2." newsletter. Please click on the following link to activate your subscription: Activate
"; // $html = ""._ORG." - Newsletter Activation Email

Click the Link below to activate your subscription to the Words of Wellness blog newsletter. You will also burn 15 calories for doing so!
Well, Maybe - But don't you like the thought of that!?

Tips, tools and inspiring words will land right in your inbox each week so you can make small changes, or big ones. The Healthy balanced life you seek is possible. Congratulations! You're on your way!

Click this activation link to complete your subscription!


Words of Wellness

"; // $text = "Click the Link below to activate your subscription to the Words of Wellness blog newsletter. You will also burn 15 calories for doing so!\r\n\r\nWell, Maybe - But don't you like the thought of that!?\r\n\r\nTips, tools and inspiring words will land right in your inbox each week so you can make small changes, or big ones. The Healthy balanced life you seek is possible. Congratulations! You're on your way!\r\n\r\nPlease click the following link to activate your subscription:"._URL."newsletter.php?activate=Y&o=".base64_encode($_POST["name"])."&t=".base64_encode($_POST["email"]); $html = " "._ORG." - Newsletter Activation Email

Thanks for subscribing to the "._NEWSLETTER_NAME.". Please click the link below to activate your subscription. "._MESSAGE_HTML."

Click this activation link to complete your subscription!


"; if (_ACTIVATION_EMAIL_THANK_YOU == "1") { $html .= " "; } $html .= "

"._ORG."

"; $text = "Thanks for subscribing to the "._NEWSLETTER_NAME.". Please click the link below to activate your subscription. "._MESSAGE_TEXT."\r\n\r\nThanks for subscribing!\r\n\r\n"._ORG."\r\n\r\nActivation Link:"._URL."newsletter.php?activate=Y&o=".base64_encode($_POST["name"])."&t=".base64_encode($_POST["email"]); $headers["From"] = $from; $headers["To"] = $_POST["email"]; $headers["Subject"] = $subject; $crlf = "\n"; $mime = new Mail_mime($crlf); $mime->setHTMLBody($html); $mime->setTXTBody($text); $message = $mime->get(); $headers = $mime->headers($headers); $params["host"] = _EMAIL_HOST; $params["auth"] = TRUE; $params["auth"] = 'PLAIN'; $params["username"] = _EMAIL_USER; $params["password"] = _EMAIL_PASS; //$params["localhost"]= 'This.may.be.yourIP'; // create the mail object using the Mail::factory method $mail_message = & Mail::factory('smtp', $params); $mail = $mail_message->send($_POST["email"], $headers, $message); if (PEAR::isError($mail)) { $rval = "The email was not sent. Please call ". _PHONE ."."; $rval.= ($mail->getMessage()); } else { $rval = "An email has been sent to the email address you provided. Please click on the link provided in the email to activate your subscription. Please add "._EMAIL." to your contacts list. You might also need to update spam filters to accept all emails from "._DOMAIN."."; } echo $rval; } ?>