Reply
CDO Objects form?
Old 04-29-2008, 04:08 PM CDO Objects form?
yanksno1's Avatar
Novice Talker

Posts: 5
Hi all. I just moved to a new web host and on their Windows 2008 server they use CDO Objects for forms. I was curious to see if anyone had one as an example I can use. It looks like they do require server authentication when sending the mail, so that'd need to be built in. They did post a code sample of how the programming should look like (which I can post if you guys want it) but it didn't give an example with a form so it really doesn't help me lol. If someone could do one with the normal form fields: Name, Email address, Subject, Message. I'd really appreciate it if you guys could help me out. Much thanks if you can.
yanksno1 is offline
Reply With Quote
View Public Profile
 
Sponsored Links (We share ad revenue):
 
Old 04-29-2008, 05:49 PM Re: CDO Objects form?
chrishirst's Avatar
Super Moderator

Posts: 10,618
Location: Blackpool. UK
http://www.candsdesign.co.uk/article.../show-form.asp

http://www.candsdesign.co.uk/article...-email/cdosys/
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-29-2008, 11:16 PM Re: CDO Objects form?
yanksno1's Avatar
Novice Talker

Posts: 5
CDOSYS is the same as CDO Object (that's what my hosting company is calling it)?
yanksno1 is offline
Reply With Quote
View Public Profile
 
Old 04-30-2008, 07:55 AM Re: CDO Objects form?
chrishirst's Avatar
Super Moderator

Posts: 10,618
Location: Blackpool. UK
It should be.

CDO is Collaboration Data Objects and CDOSYS is the name of the DLL.

The earlier version of CDONTS was deprecated in server 2003.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-01-2008, 08:42 AM Re: CDO Objects form?
yanksno1's Avatar
Novice Talker

Posts: 5
Code:
Dim ObjSendMail
Set ObjSendMail = CreateObject( "CDO.Message" )

'This section provides the configuration information for the remote SMTP server.
ObjSendMail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/sendusing" ) = 2 'Send the message using the network (SMTP over the network).
ObjSendMail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpserver" ) = "mail.example.com"
ObjSendMail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpserverport" ) = 25
ObjSendMail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpusessl" ) = False
ObjSendMail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout" ) = 60

' The mail server requires outgoing authentication use a valid email address and password.
ObjSendMail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ) = 1 'basic (clear-text) authentication
ObjSendMail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/sendusername" ) =" your_email@domain.com"
ObjSendMail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/sendpassword" ) = "password"
ObjSendMail.Configuration.Fields.Update
'End remote SMTP server configuration section==

ObjSendMail.To = " sample@domain.com"
ObjSendMail.Subject = "this is the subject"
ObjSendMail.From = " your_address@domain.com"

' we are sending a text email.. simply switch the comments around to send an html email instead
'ObjSendMail.HTMLBody = "this is the body"
ObjSendMail.TextBody = "this is the body"
ObjSendMail.Send
Set ObjSendMail = Nothing
This is the sample code they give to use (I'm assuming it works). Would it be possible for someone to point me in the direction of getting this working with the form? I really just need to know how to setup the input names. I would also like when the email is sent that the reply address is the senders email address, subject the subject they typed in and so on. Any help would be greatly appreciated.
yanksno1 is offline
Reply With Quote
View Public Profile
 
Old 05-03-2008, 03:27 AM Re: CDO Objects form?
chrishirst's Avatar
Super Moderator

Posts: 10,618
Location: Blackpool. UK
Look at the code I linked to in post #2
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Sponsored Links (We share ad revenue):
 
Reply     « Reply to CDO Objects form?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML


Page generated in 0.15808 seconds with 14 queries