I've been working on making some changes to the website for the company that I am currently an intern for. There is a function that they have in one of their files that uses CDOSYS to allow visitors to our site to email us with a support request. I've been testing this functionality out, but the emails aren't actually being sent to our email addresses. I've looked all over the internet for how to send an email using ASP, and the code that is part of our file (which appears below) looks like it is doing everything I need it to. This is the function used to send an email:
Expand|Select|Wrap|Line Numbers
- function SendEmail(strEmailText, strEmailSubject, strEmailTo, strEmailFrom)
- '*** Returns True if email was sent.
- '*** Returns False if an error occurred.
- on error resume next
- Set objMail = Server.CreateObject("CDO.Message")
- objMail.From = strEmailFrom
- objMail.To = strEmailTo
- objMail.Subject = strEmailSubject
- objMail.TextBody = strEmailText
- objMail.Send
- Set objMail = Nothing
- if err.number then
- '*** error occurred while sending mail
- SendEmail = False
- Response.Write (err.Description)
- else
- SendEmail = True
- end if
- On Error GoTo 0
- end function
I will greatly appreciate any help/input I receieve.
Thank you in advance!