<%@ Language=VBScript%> <% mes = "" IsSuccess = false sTo = "admin@hostbox.ch" sFrom = Trim(Request.Form("txtFrom")) sSubject = Trim(Request.Form("txtSubject")) sMailServer = "127.0.0.1" sBody = Trim(Request.Form("txtBody")) if Request("__action")="TestEMail" then TestEMail() end if Sub TestEMail() Set objMail = Server.CreateObject("CDO.Message") Set objConf = Server.CreateObject("CDO.Configuration") Set objFields = objConf.Fields With objFields .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = sMailServer .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With With objMail Set .Configuration = objConf .From = sFrom .To = sTo .Subject = sSubject .TextBody = sBody End With Err.Clear on error resume next objMail.Send if len(Err.Description) = 0 then mes = " The message was sent to " + sTo mes = mes + " " IsSuccess = true else mes = " " + Err.Description + " The mail sending test failed." end if Set objFields = Nothing Set objConf = Nothing Set objMail = Nothing End sub Sub Alert(html) if IsSuccess then Response.Write "
Success:" & html & "
" else Response.Write "
Failure:" & html & "
" end if End Sub %> ASP Features Test
ASP Features Test

This page allows you to test mail sending through the local Plesk Control Panel's SMTP mail server. You need to supply the sender's e-mail address or name, message subject and body.

<% if len(mes) > 0 then Alert(mes) end if %>
Test mail sending

Test