<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
If Request.Form("btnSubmit") <> "" Then
Dim UserName
Dim UserMessage
UserName = Request.Form("txtName")
UserMessage = Request.Form("txtMessage")
Dim Message
Message = "Mail from the Web site" & vbCrlf & vbCrLf
Message = Message & "User " & UserName & " left the following message: " & vbCrLf
Message = Message & UserMessage & vbCrLf & vbCrLf
Dim oMessage
Set oMessage = Server.CreateObject("CDONTS.NewMail.1")
'---- BodyFormat Property ----
Const CdoBodyFormatHTML = 0 ' The Body property is to include Hypertext Markup Language (HTML).
Const CdoBodyFormatText = 1 ' The Body property is to be exclusively in plain text (default value).
'---- MailFormat Property ----
Const CdoMailFormatMime = 0 ' The NewMail object is to be in MIME format.
Const CdoMailFormatText = 1 ' The NewMail object is to be in uninterrupted plain text (default value).
With oMessage
.To = "mbm@ardakankavosh.Com"
.Bcc = "bbm@Ardakankavosh.Com"
.From = "info@ardakankavosh.Com"
.Subject = "User " & UserName & " left a message"
.BodyFormat = CdoBodyFormatText ' CdoBodyFormatHTML
.MailFormat = CdoMailFormatMime
.Body = Message
.Send
End with
Set oMessage = Nothing
Response.Redirect("ThankYou.asp")
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Sending E-Mail woth ASP</title>
</head>
<body>
</body>
</html>
11 Ağustos 2007 Cumartesi
Sending Email in ASP
Subscribe to:
Kayıt Yorumları (Atom)
0 Comments:
Post a Comment