it may be working but you may not be getting the mail....the from address and to address must be valid e-mails...look in the inetpub directory and see if there are any mails waiting in the queue or if there are any mails in the bad mail folder....
here is the code I use to send emails and it looks like you are also doing it right. so my guess is that you arent specifying valid emails....
MattCode:Function sendEmail(strTo, strFrom, strSubject, strBody, emailType) Dim objCDO Set objCDO = Server.CreateObject("CDONTS.NewMail") ' Create a new mail object objCDO.To = strTo ' Specify To address objCDO.From = strFrom ' Specify From address objCDO.Subject = strSubject ' Specify Subject objCDO.BodyFormat = emailType ' Specify email type -- 0 HTML objCDO.MailFormat = emailType ' Specify email type -- 0 HTML objCDO.Body = strBody ' Put content in objCDO.Send ' Send the email Set objCDO = Nothing ' Deallocate mail object End Function




Reply With Quote