<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>Processing...</title>
</head>

<body>

<p>
<%

set Mailer = Server.CreateObject( "CDO.Message" )

dim iAtPos
dim ValidEmail

' Validate the email address
iAtPos = instr(Request.querystring("email"),"@")
if iAtPos > 0 then
  if instr(iAtPos + 1,Request.querystring("email"),".") = 0 then
    'There is NO period after the @
    ValidEmail=0
  else
    'There is a period
	ValidEmail=1		  
    end if
  else
    'There is no @ sign
    ValidEmail=0	   
end if

dim strredirect

' Note that as addRecipient is method and not
' a property, we do not use an equals ( = ) sign
Mailer.To = "mailinglist@xequte.com"

Mailer.From = """Postmaster"" <postmaster@xequte.com>"

Mailer.Subject     = "UNSUBSRIBE ALL " & Request.querystring("email")

Mailer.TextBody = "Email: " &  Request.querystring("email") & vbCrLf & "Action: Unsubscribe" & vbCrLf & "Method: E-mail Removal"

if ValidEmail=0 then 
  Response.Write "<META HTTP-EQUIV='REFRESH' CONTENT='0; URL=http://www.xequte.com/contact/mail_norecip.html'></HEAD>"
else
if Mailer.Send<>0 then 'bad mail
  Response.Write "<META HTTP-EQUIV='REFRESH' CONTENT='0; URL=http://www.xequte.com/contact/mail_error.html'></HEAD>"
else
  Response.Write "<META HTTP-EQUIV='REFRESH' CONTENT='0; URL=http://www.xequte.com/mailinglist/removed.html'></HEAD>"
end if
end if

' Free the CDO object
set Mailer = Nothing
%>

</body>
</html>