gablex
Posts: 1
|
Posted: 10/07/2011, 5:25 AM |
|
Hello,
I cannot understand why I am not able to send email after placing the following codes on after insert event. I run MS Windows 7, with ASP as my language; I also have MS Outlook running well with smtp.mydomain.com as the Outgoing Mail Server (SMTP).
Dim cdoMessage
Set cdoMessage = Server.CreateObject("CDO.Message")
' Set cdoMessage = Server.CreateObject("Persits.MailSender") [ this also didn't work]
cdoMessage.From = "myname@mydomain.com"
cdoMessage.To = "myname@yahoo.com"
cdoMessage.Subject = "TEST SEND EMAIL"
cdoMessage.TextBody = "TEST EMAIL FROM ME"
cdoMessage.host = "smtp.mydomain.com"
cdoMessage.Send
Set cdoMessage = Nothing
The error I get is that there is problem with my page. Can someone help out?
|
|
|
andrewi
Posts: 162
|
Posted: 10/16/2011, 3:58 AM |
|
I use the same code, except that I don't use the cdoMessage.host line - I haven't seen any other examples (in a quick search) that use a .host parameter.
More importantly, if this code is failing you should be seeing proper error messages (giving the line that caused the exception) rather than just "there is a problem with your page". Do you have 'show friendly HTTP error messages' turned on in IE (Avanced settings tab) - or equivalent in other browsers? Debugging will be difficult without seeing the details of the error.
|
|
|
|