Sende mail via ASP:

<%
function SendMail(sTo, sFrom, sPriority, sSubject, sBody, bHTML)
On Error Resume Next

Const cdoLow = 0
Const cdoNormal = 1
Const cdoHigh = 2
Const CdoBodyFormatText = 1
Const CdoMailFormatText = 1


' Create a new mail object
Set oMailMessage = server.CreateObject("CDONTS.NewMail")
oMailMessage.To = sTo
' Good practice to set a Reply-TO
oMailMessage.Value("Reply-To") = sFrom
oMailMessage.From = sFrom


sPriority = ucase(sPriority)
if sPriority = "LOW" then
oMailMessage.importance = cdoLow
elseif sPriority = "HIGH"
oMailMessage.importance = cdoHigh
else
oMailMessage.importance = cdoNormal
end if


' Set body format for HTML if needed
if bHTML then
oMailMessage.BodyFormat = CdoBodyFormatText
oMailMessage.MailFormat = CdoMailFormatText
end if

oMailMessage.Body = sBody

' Now send it off!
oMailMessage.Send


set oMailMessage = nothing

if Err then
SendMail = false
else
SendMail = true
end if

end function
%>

Dette scriptet må kalles opp med parametre. Disse verdiene får du typisk fra en form :)

Sakset fra microsoft.com