Tutorial
Code:
<%
'if an error than continue
On Error Resume Next
' define your variables
set mail = Server.CreateObject("CDONTS.NewMail")
mail.From = "test <test@test.nl>"
mail.To = request("email")
mail.Bcc = "test@test.nl"
mail.Subject = "my test mail"
mail.BodyFormat = 0
mail.MailFormat = 0
mail.Body = "<html>" &_
"<head>" &_
"<title>Test</title>" &_
"</head>" &_
"<body>" &_
"Hello world!" &_
"</body>" &_
"</html>"
mail.Importance = 1
mail.Send
set mail = Nothing
If Err.number <> 0 Then
response.write "An error has occurred: "
response.write Err.description
Else
response.write "Email is sent..."
End If
%>
Comments
Pimpy.T - 2009-03-27
This vb-script is the most basic e-mail script in asp that there is. Offcourse you need a IIS server installed on your server or hosted webserver.
But I personally preffer PHP script for it's endless flexibility and infinite resources.
But I personally preffer PHP script for it's endless flexibility and infinite resources.
STVProductions - 2009-05-11
I agree with Pimpy.T. For whatever reason you may have to build an email script, using PHP makes it much easier and it is well supported on any operating system.
You have to be logged in to write a comment.



