/*
Please, only make changes to the following line to change the date of the show
in the outgoing email...javascript:fixslashes('content');
*/
$dates = "January 12, 13 & 14, 2010";
$defaultmessage = "Drop by and see us at Landscape Ontario's CONGRESS 2010 - Featuring Fencecraft, OPA's Explorations and the GREEN FORUM. As a valued customer, we would like to show you what we have been doing and how we can help you achieve your objectives. Also, take the opportunity while you are at Congress to visit the New & Green Products Showcase, and catch a couple of seminars at the Congress Conference. We look forward to seeing you in our booth.";
include("tsnetfunctions.inc");
$title = "Congress Emailer";
if ($_REQUEST["command"] == "Send Message") {
if (!(is_email($_REQUEST["email"]))) {
$error .= "Email address entered is invalid. ";
}
elseif ($_REQUEST["companyname"] == "") {
$error .= "You must enter your company name. ";
}
elseif ($_REQUEST["booth"] == "") {
$error .= "You must enter your booth number. ";
}
else {
$supplied = preg_split("/s+/", $_REQUEST["emails"]);
$search = array("'", """, ",", ">“, “<", ";", ":");
$replace = "";
$destination = array();
foreach ($supplied as $emailaddy) {
$emailaddy = str_replace($search, $replace, $emailaddy);
if (is_email($emailaddy)) {
$destination[] = $emailaddy;
}
}
if (count($destination) > 0) {
$headers .= “Content-class: urn:content-classes:messagen”;
$headers .= “MIME-Version: 1.0n”;
$headers .= “Content-Type: multipart/related;n”;
$headers .= “ttype=”multipart/alternative”;n”;
$headers .=”tboundary=”—-_=_NextPart_001_01C5DA39.EC99BBBA”n”;
$headers .= “X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0n”;
$headers .= “X-MS-Has-Attach: yesn”;
$headers .= “X-MS-TNEF-Correlator:n”;
$message = “This is a multi-part message in MIME format.nn”;
$message .= “——_=_NextPart_001_01C5DA39.EC99BBBAn”;
$message .= “Content-Type: multipart/alternative;n”;
$message .= ” boundary=”—-_=_NextPart_002_01C5DA39.EC99BBBA”nn”;
$message .= “——_=_NextPart_002_01C5DA39.EC99BBBAn”;
$message .= “Content-Type: text/plain;n”;
$message .= ” charset=”us-ascii”n”;
$message .= “Content-Transfer-Encoding: quoted-printablenn”;
$message .= “Congressn”;
$message .= “Canada’s 37th International Horticultural Lawn and Garden Trade Show & Conferencen”;
$message .= “Featuring Fencecraft, Explorations and the Green Forumn”;
$message .= $dates . “n”;
$message .= “Toronto Congress Centre, Toronto, Canadann”;
$message .= wordwrap(strip_tags(stripslashes($_REQUEST[“message”])));
$message .= “nnRegister Online for Congress at: https://secure.landscapeontario.com/congress/n”;
$message .= “and don’t forget to stop by booth ” . $_REQUEST[“booth”] . ” to visit n”;
$message .= stripslashes($_REQUEST[“companyname”]) . “!nnnn”;
$message .= “This message has been generated by Landscape Ontario for n”;
$message .= stripslashes($_REQUEST[“companyname”]) . ” who is exhibiting at Congress 2010n”;
$message .= “and felt that you should be invited. If you do not wish to receive any more ofn”;
$message .= “these invitations, please contact ” . stripslashes($_REQUEST[“companyname”]) . “n”;
$message .= “and have your email address removed from their list. Landscape Ontario n”;
$message .= “is not responsible for any inappropriate use of this system.nn”;
$message .= “——_=_NextPart_002_01C5DA39.EC99BBBAn”;
$message .= “Content-Type: text/html;n”;
$message .= ” charset=”us-ascii”n”;
$message .= “Content-Transfer-Encoding: quoted-printablenn”;
$message .= “n”;
$message .= “n”;
$message .= “n”;
$message .= “
n”;$message .= “
$message .= “ | |
|
$message .= “nn”;
$message .= “——_=_NextPart_002_01C5DA39.EC99BBBA–nn”;
$message .= “——_=_NextPart_001_01C5DA39.EC99BBBAn”;
$message .= “Content-Type: image/jpg;n”;
$message .= “tname=”congress2010.jpg”n”;
$message .= “Content-Transfer-Encoding: base64n”;
$message .= “Content-ID: <957192714@26102005-2FA2>n”;
$message .= “Content-Description: congress2010.jpgn”;
$message .= “Content-Location: congress2010.jpgnn”;
$message .= chunk_split(base64_encode(file_get_contents(“/usr2/www/locongress.com/images/congress2010.jpg”)));
$message .= “nn——_=_NextPart_001_01C5DA39.EC99BBBA–n”;
$headers .= “From: “” . stripslashes($_REQUEST[“companyname”]) . “” <" . $_REQUEST["email"] . ">n”;
foreach ($destination AS $emailaddress) {
mail($emailaddress, “See us at Congress™, $message, $headers);
print(“Emailed ” . $emailaddress . “
“);
}
?>All messages sent!
congfooter(); exit(); } else { $error .= "Could not find any valid destination email addresses."; } } } ?>
if ($error != "") { ?> print($error); ?>
}
?>Using the form below, you can send an email to your customers inviting them to come and
see you at Congress. Simply fill in your company name, your own email address and booth
number and then cut and paste or type in a list of customer email addresses. Invalid email addresses are automatically discarded.
You also have the option to edit the text in the main body of the message. Your booth number and company name are automatically
generated at the bottom of the email when it is sent. If you want to try it out, put in only your email address in the destination field.