Print Page | Close Window

trying to send emails using cdonts

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3837
Printed Date: 30 March 2026 at 10:06am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: trying to send emails using cdonts
Posted By: Charmaine
Subject: trying to send emails using cdonts
Date Posted: 25 June 2003 at 5:21pm

hi

I was going through the ASP Web Based Email Using Microsoft's CDONTS tutorial on this site and when running the examples , the email is never received. The receiving address was replaced as specified and since i am using it on winXP  i also downloaded and registered the cdonts.dll however i never receive any emails No errors are given though .. any ideas why this is happening ? 

greatly appreciated

Charmaine Cry




Replies:
Posted By: Bullschmidt
Date Posted: 27 June 2003 at 12:05am

You might try switching from CDONTS (which is being phased out) to the newer CDO such as can be seen in the E-mail Attachment example at http://www.asp101.com/samples - http://www.asp101.com/samples



-------------
J. Paul Schmidt, Freelance ASP Web Developer
www.Bullschmidt.com - www.Bullschmidt.com
Classic ASP Design Tips, ASP Web Database Sample (Freely Downloadable)


Posted By: Charmaine
Date Posted: 10 July 2003 at 4:10am

i did try use CDO but it keeps giving me the error

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/test/cdonts1.asp, line 10

Invalid class string

which keeps poitning to  Set Mailer = Server.CreateObject("CDO.Message")

Confused

is there something i am missing out pls?

 

thanks agfain

Charmaine



Posted By: Bunce
Date Posted: 11 July 2003 at 5:20am

Search examples using CDOSYS.

Also check what components your host supports.



-------------
There have been many, many posts made throughout the world...
This was one of them.


Posted By: Charmaine
Date Posted: 29 July 2003 at 4:48am

hi again ..

thank you all for your help .. apparently it was a host problem as it only supports SSO component 

The problem now is whether i could actually set the format of the email's body to html  using SSO .. i ve been trying to look up examples but havent really been succesful except for sending the mail and receiving it

Would anyone know of some site which indicates how and if SSO supports body formatting pls?

thanks in advance

Charmaine



Posted By: the boss
Date Posted: 30 July 2003 at 2:39pm
and whats is SSO

-------------
http://www.web2messenger.com/theboss">


Posted By: Greaser
Date Posted: 31 July 2003 at 10:56am

You can also use CDOSYS.  I now use it on any site that sends mail.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_clb_sending_smtp_mail_by_port_25_using_cdosys_vb.asp - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_clb_sending_smtp_mail_by_port_25_using_cdosys_vb.asp

'Sending SMTP mail via port 25 using CDOSYS
'This VB sample uses CDOSYS to send SMTP mail using the cdoSendUsingPort option and specifying a SMTP host.

Private Sub SendMessage(strTo As String, strFrom As String)

'Send using the Port on a SMTP server
Dim iMsg As New CDO.Message
Dim iConf As New CDO.Configuration
Dim Flds As ADODB.Fields
Dim strHTML

Set Flds = iConf.Fields

With Flds
    .Item(cdoSendUsingMethod) = cdoSendUsingPort
    .Item(cdoSMTPServer) = "smarthost"
    'Use SSL to connect to the SMTP server:
    '.Item(cdoSMTPUseSSL) = True
    .Item(cdoSMTPConnectionTimeout) = 10
    .Update
End With

' Build HTML for message body
strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<b> This is the test HTML message body</b></br>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"

With iMsg
    Set .Configuration = iConf
    .To = strTo
    .From = strFrom
    .Subject = "This is a test CDOSYS message (Sent by Port)"
    .HTMLBody = strHTML
    '.TextBody = "This is the text body of the message..."

    .Send
End With

' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

End Sub



-------------
'Computers don't make errors...what they do, they do on purpose.' - Dale Gribble



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net