ASP Source Code

ASP File: vbscript/email/newmail.asp

 
   ASP Script
   Comments
   HTML and Text

<%@ Language=VBScript %>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</head>
<body>
<div align="right"><a href="newmail.html"><strong>Go Back</strong></a></div>
<%
Dim newMail
if Request.Form("ToAddress") <> "" and Request.Form("Subject") <> "" and Request.Form("FromAddress") <> "" then
Set newMail = Server.CreateObject("CDONTS.NewMail")
newMail.Subject = Request.Form("Subject")

newMail.To = Request.Form("ToAddress")

if Request.Form("CcAddress") <> "" then
     newMail.Cc = Request.Form("CcAddress")
end if

if Request.Form("BccAddress") <> "" then
     newMail.Bcc = Request.Form("BccAddress")
end if

if Request.Form("Attach") <> "" then
     newMail.AttachFile Request.Form("Attach")
end if

newMail.BodyFormat = cint(Request.Form("BodyFormat"))

newMail.From = Request.Form("FromAddress")

newMail.Importance = cint(Request.Form("Importance"))

newMail.Body = Request.Form("Body")
newMail.Send
Set newMail = Nothing

response.write "<p> Success to send!!!"
end if
'Response.Redirect "newmail.htm"

%>

<p> </p>
<p align="right"> </p>

</body>
</html>