   [web] ASP CDONTS/CDOSYS E-Mailing Problem
  I get this error when using CDONTS when trying to send a simple email:Server object error 'ASP 0177 : 800401f3'Server.CreateObject Failed/ahs/emailer/email.asp, line 19800401f3Here is the code for CDONTS:16 <%17 Dim Mail1819 Set Mail=Server.CreateObject("CDONTS.NewMail")20 Mail.To="username@domain.com"21 Mail.From="testing@domain.com"22 Mail.Subject="Just testing my script"23 Mail.Body="Hey! I am sending this email through an ASP Page and guess what? I haven’t learnt much yet, but know that ASP is very powerful."24 25 Mail.Send26 Set Mail=nothing 2728 Response.Write("Email Sent Successfully")29 %>I get a completely different error when I use CDOSYS:CDO.Message.1 error '80040220'The "SendUsing" configuration value is invalid./ahs/emailer/email.asp, line 24 Here is the code:17 <%18 Set myMail=CreateObject("CDO.Message")19 myMail.Subject="Sending email with CDO"20 myMail.From="mymail@mydomain.com"21 myMail.To="webmaster@labsply.com"22 myMail.TextBody="This is a message."23 myMail.Send24 set myMail=nothing25 %>Do you think it may be a SMTP server problem?   
  Here's my code that works.Function SendHTMLMail(sTo, sFrom, sSubject, sBody)Dim bOKDim objCDODim sSchemaSet objCDO = NothingbOK = FalseOn Error Resume NextSet objCDO = Server.CreateObject("CDO.Message")On Error Goto 0If objCDO Is Nothing ThenElsesSchema = "http://schemas.microsoft.com/cdo/configuration/"With objCDO.Configuration.Fields.Item(sSchema & "sendusing") = 2 'Send the message using the network (SMTP over the network)..Item(sSchema & "smtpserver") ="192.168.1.111".Item(sSchema & "smtpserverport") = 25.Item(sSchema & "smtpusessl") = False 'Use SSL for the connection (True or False).Item(sSchema & "smtpconnectiontimeout") = 60.Item(sSchema & "smtpauthenticate") = 0 'Do not authenticate'.Item(sSchema & "smtpauthenticate") = 1 'Authenticate plain text'.Item(sSchema & "sendusername") = "yourusername"'.Item(sSchema & "sendpassword") = "yourpassword".UpdateEnd With objCDO.To = sToobjCDO.From = sFromobjCDO.Subject = sSubjectobjCDO.HTMLBody = sBodyobjCDO.SendbOK = TrueEnd IfSendHTMLMail = bOKEnd Function