If anyone is interested, here is my code:
<?php
//session_start();
require_once("db_cns.php");
require_once("htmlMimeMail5/htmlMimeMail5/htmlMimeMail5.php");
$text2 = "
<html>
<head>
<title>Untitled</title>
<script language=\"JavaScript\" type=\"text/javascript\">
window.onload = function () {
var today = new Date();
var expire = new Date();
var cookieValue=\"1\";
var name =\"view1\";
var cookieFound = 0;
var start = 0;
var end = 0;
var CookieString = document.cookie;
var myvar;
var i =0;
while (i <= CookieString.length) {
start = i;
end = start + name.length;
if (CookieString.substring(start,end) == name) {
cookieFound = true;
break;
}
i++;
}
if (cookieFound==false) {
expire.setTime(today.getTime() + 3600000*24*1);
document.directForm.submit();
}
}
</script>
</head>
<body >
HTML
<FORM
NAME=\"directForm\"
ACTION=\"http://localhost/email/email/test.php\"
METHOD=\"get\"
ENCTYPE=\"multipart/form-data\">
<input type=\"hidden\" name=\"cid\" value=\"1000\">
</form>
</body>
</html>
";
// Instantiate a new HTML Mime Mail object
$mail = new htmlMimeMail5();
// Set the sender address
$mail->setFrom("email");
// Set the reply-to address
$mail->setReturnPath("email");
// Set the mail subject
$mail->setSubject("Test HTML Mime Mail");
// Set the mail body text
$mail->setText("HELL0");
// Create the HTML email
$mail->setHTML($text2);
// Send the email!
$mail->send(array("email"));