smpt email server does not deliver email from the form

I have the following routing in my email.asp,
which does not produce any error,
ends up with   "Your message has been sent"
Yet no mail delivered!

please, tell me what's wrong

-------------------------------------------------------------------------------------
<%
Dim strTo, strSubject, strBody, strFrom, blnHTML,sMailServer
Dim objCDOMail 'The CDO object

strFrom = Request.Form("from")
strSubject = Request.Form("subject")
strBody = Request.Form("message")
blnHTML = ""
sMailServer = "mail.mydomain.com"

Set Mail=Server.CreateObject("CDO.Message")

Sub SendMailCDOSYS(strFrom,strTo,strSubject,strBody,blnHTML,sMailServer)
On Error Resume Next
     Dim objCDOConf,objCDOSYS
     ' ** CREATE THE E-MAIL SERVER OBJECT **
     Set objCDOSYS = Server.CreateObject("CDO.Message")
     Set objCDOConf = Server.CreateObject ("CDO.Configuration")
     ' ** SET AND UPDATE FIELDS PROPERTIES **
     With objCDOConf
          ' ** OUT GOING SMTP SERVER **
            .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.mydomain.com"
            .Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")= 1
            .Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") =  "postmaster@mydomain.com"
            .Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "mypassword"
            .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
        .Fields.Update
     End With
     ' ** UPDATE THE CDOSYS CONFIGURATION **
     Set objCDOSYS.Configuration = objCDOConf

     With objCDOSYS    
          ' ** WHO THE E-MAIL IS FROM **
          .From = strFrom
          ' ** WHO THE E-MAIL IS SENT TO **
          .To = "postmaster@mydomain.com"
          .sMailServer = "mail.mydomain.com"        
          ' ** THE SUBJECT OF THE E-MAIL **
          .Subject = strSubject
          .TextBody = strBody
          .blnHTML = ""
          ' ** SEND THE E-MAIL **
          .Send
     End with                    
       
     ' ** CLOSE THE SERVER MAIL OBJECT **
     Set objCDOSYS = Nothing
End Sub
Response.Write( "Your message has been sent")
%>
khlausterAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aflockhartCommented:
It doesn't produce any error, because you have included this line:
On Error Resume Next

If you remove it, you may see where the process is failing.

You also never actually call the SendMailCDOSYS routine.  You define it but never use it.



0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NorushCommented:
If you remove the following line you will get the errormessage explaining what is going on
So remove the following line and run your code again:

on error resume next
0
khlausterAuthor Commented:
I uncommented
 on error resume next,
added
Call SendMailCDOSYS(strFrom,strTo,strSubject,strBody,blnHTML,sMailServer)
and Now I got

Access is denied.
on line where .Send

hmm..
0
khlausterAuthor Commented:
And it is host suggested routine they have in a similar code samples for Asp1.1
Now I am puzzled who is denied an access to my own mail:

Microsoft:
Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "mypassword"

or Host:
.Send

:)  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.