Hi I've installed aspemail onto server 'serverb' - looks ok - the email agent is working ok, so the install looks ok.
i've got an asp file which part of the code is.
this is the CCCu_SENDASPEMAIL.asp file -
I have configured the ernail agent so the SMTP tab is set to relay through the ipaddress of the mail server and port 25
nothing happens when i run my asp page !
any help appreciated
rich
i've got an asp file which part of the code is.
Code:
<!-- #include file="CCCu_SENDASPEMAIL.asp" -->
send_email_asp request("txtEmailAddress"),"Chester City Council Web Link",request("txtWebink")
this is the CCCu_SENDASPEMAIL.asp file -
I have configured the ernail agent so the SMTP tab is set to relay through the ipaddress of the mail server and port 25
nothing happens when i run my asp page !
any help appreciated
rich
Code:
<script runat=server language=vbscript>
'**************************************************
'VERSION = 1
'**************************************************
Function send_email_asp(strTo,strSubject,strBody)
strHost = "ipaddress of mail server"
Set Mail = Server.CreateObject("Persits.MailSender")
' enter valid SMTP host
Mail.Host = strHost
Mail.From = "myemailaddress" ' From address
Mail.FromName = "richey" ' optional
Mail.AddAddress strTo
' message subject
Mail.Subject = strSubject
' message body
Mail.Body = strBody
strErr = ""
bSuccess = False
On Error Resume Next ' catch errors
Mail.Send ' send message
If Err <> 0 Then ' error occurred
strErr = Err.Description
else
bSuccess = True
End If
Err.Clear
End Function
</script>