We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >


1 reply

Last post Nov 08, 2004 08:45 AM by tomkmvp

  • CDOSYS Help

    Nov 06, 2004 03:04 AM|uno2000|LINK

    Can anyone help me with a totally newbie question, I am trying to create a mail form in asp, i downloaded a nice script from brainjar.com for this and it appears to be working apart from the fact that my hosts smtp server requires authentication. I have added what i think are the correct lines to the code but it still wont work, could anyone point me in the right direction please? I have some programming knowledge but it is in php format not asp so be gentle with me. Here is the code for the cdosys part with my authentication additions. 'Send email (CDOSYS version). if mailComp = "CDOSYS" then set cdoMessage = Server.CreateObject("CDO.Message") set cdoConfig = Server.CreateObject("CDO.Configuration") cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'whether you use a authentication on the server objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "****" objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "****" cdoConfig.Fields.Update set cdoMessage.Configuration = cdoConfig cdoMessage.From = fromAddr cdoMessage.ReplyTo = replyTo cdoMessage.To = recipients cdoMessage.Subject = subject cdoMessage.HtmlBody = body on error resume next cdoMessage.Send if Err.Number <> 0 then SendMail = "Email send failed: " & Err.Description & "." end if set cdoMessage = Nothing set cdoConfig = Nothing exit function end if Obviously username and password removed. Many thanks for your time in this matter Russ
  • Re: CDOSYS Help

    Nov 08, 2004 08:45 AM|tomkmvp|LINK

    Here's an ASP example using authentication http://www.aspfaq.com/show.asp?id=2026