Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASPEMAIL

Status
Not open for further replies.

richey1

Technical User
Oct 5, 2004
184
0
0
GB
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.

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>
 
the email now goes ok , although it still says Error process request : ???

thanks
rich

Code:
function SendMyMail()

Dim Mail
			Set Mail = Server.CreateObject("Persits.MailSender")
			Mail.Host = Application("ASPEMailServer")
			Mail.From = Application("EmailFromAddress") ' From address
			Mail.FromName = Application("EmailFrom") ' optional

		Mail.AddAddress request("txtEmailAddress")
		
		' message subject
		mail.subject = "CRM Enquiry"
		' message body
		Mail.Body = Request("txtWebLink")

		If Request("IsHtml") = "HTML" Then
		Mail.IsHTML = True 
		End If

		On Error Resume Next ' catch errors
		Mail.Send	' send message
				TrapError "EnquiryEmail aspemail 0120"
			If Err <> 0 Then ' error occurred
				Response.Write Err.Description
				Response.End
			else
			end if

end function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top