I would recommend using CDOSYS if you have a Win2K box. Here is an example that uses authentication to send.
<!--METADATA TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library" -->
<!--METADATA TYPE="typelib"
UUID="00000205-0000-0010-8000-00AA006D2EA4"
NAME="ADODB Type Library" -->
<html>
<head>
<title>email</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
strLastName = Request("lastname")
strFirstName = Request("firstname")
strPhone = Request("phone")
strEmail = Request("emailfrom")
strDepartment = Request("department")
strOffice = Request("office")
strSummary = Request("summary")
strDetail = Request("detail")
%>
<%
Dim objMessage, objConfig
Set objMessage = CreateObject("CDO.Message")
Set objConfig = CreateObject("CDO.Configuration")
'Configuration:
objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort
objConfig.Fields(cdoSMTPServer) = "
removed"
objConfig.Fields(cdoSMTPServerPort) = 25
objConfig.Fields(cdoSMTPAuthenticate) = 2 '2 for authentication
objConfig.Fields(cdoSendUserName) = "domain\username"
objConfig.Fields(CdoSendPassword) = "password"
'Update configuration
objConfig.Fields.Update
Set objMessage.Configuration = objConfig
'Make message
objMessage.To = "
removed"
'objMessage.Cc = "
[email protected]"
'objMessage.Bcc = "
[email protected]"
objMessage.From = strEmail
objMessage.ReplyTo = strEmail
objMessage.Subject = "HelpDesk -QuickForm"
objMessage.TextBody = strDetail & " " & "Phone:" & strPhone
objMessage.HtmlBody = "<html><body>" & "<b>A Helpdesk Request submitted by:</b> " & strFirstName &_
" " & strLastName & "<br><br><b>Problem description:</b> " & strDetail & "<br><b>Email address:</b> " & strEmail &_
"<br><br><b>Department:</b> " & strDepartment & "<br><b>Phone Number:</b> " & strPhone &_
"<br><b>My office hours are:</b> " & strOffice &_
"<br><br>***************************************** *****************<br>Quick HelpDesk Form" & "</body></html>"
' Error Handling
On Error Resume Next
' Send the CDOSYS Message
objMessage.Send
Set objMessage = Nothing
Set objConfig = Nothing
' Display success message or error
If Err.Number = 0 Then
Response.Write("<script language=""JavaScript"">var msg = ""Message Sent!""; alert(msg);</script>")
Response.Write("<body onLoad=""location.href('rightside.asp')"">")
Else
Response.Write Err.Description & ""
Err.Number = 0
End If
On Error Goto 0
%>
</body>
</html>