A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

CDO and SMTP Servers



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 15th 06, 08:24 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 3
Default CDO and SMTP Servers

I am working on an application where I want to allow a user to send a
message to multiple customers at once. I stumbled across CDO and have
some questions regarding how it works. I found the following code on
Microsoft's web site:

'************************************************* ************************************************** ********
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

' Set the CDOSYS configuration fields to use port 25 on the SMTP
server.

With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
'ToDo: Enter name or IP address of remote SMTP server.
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "remote SMTP server"

..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
.Update
End With
'************************************************* ************************************************** ********

You can specify a SMTP server in the code. My questions is, does this
SMTP server have to be the SMTP server that the recipient uses to
retrieve his or her e-mail or can this be the SMTP server through which
I wish to send the e-mail? My initial testing seems to suggest the
former. Is the latter possible? If so, how do you authenticate
yourself to the SMTP server through which you are sending the e-mail?
Thanks for any and all help.

-Vincent

Ads
  #2  
Old June 15th 06, 08:37 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default CDO and SMTP Servers

It can be any SMTP server. CDO for Windows has no relationship with the user's mail accounts. I think MSDN has documentation that explains the authentication possibilities. It's a bit outside the scope of this newsgroup, which deals with OUtlook programming.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message oups.com...
I am working on an application where I want to allow a user to send a
message to multiple customers at once. I stumbled across CDO and have
some questions regarding how it works. I found the following code on
Microsoft's web site:

'************************************************* ************************************************** ********
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

' Set the CDOSYS configuration fields to use port 25 on the SMTP
server.

With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
'ToDo: Enter name or IP address of remote SMTP server.
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "remote SMTP server"

..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
.Update
End With
'************************************************* ************************************************** ********

You can specify a SMTP server in the code. My questions is, does this
SMTP server have to be the SMTP server that the recipient uses to
retrieve his or her e-mail or can this be the SMTP server through which
I wish to send the e-mail? My initial testing seems to suggest the
former. Is the latter possible? If so, how do you authenticate
yourself to the SMTP server through which you are sending the e-mail?
Thanks for any and all help.

-Vincent

  #3  
Old June 15th 06, 08:39 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 3
Default CDO and SMTP Servers

And, obviously, I want to be able to do this without relaying. Thanks.

-Vincent


wrote:
I am working on an application where I want to allow a user to send a
message to multiple customers at once. I stumbled across CDO and have
some questions regarding how it works. I found the following code on
Microsoft's web site:

'************************************************* ************************************************** ********
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

' Set the CDOSYS configuration fields to use port 25 on the SMTP
server.

With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
'ToDo: Enter name or IP address of remote SMTP server.
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "remote SMTP server"

.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
.Update
End With
'************************************************* ************************************************** ********

You can specify a SMTP server in the code. My questions is, does this
SMTP server have to be the SMTP server that the recipient uses to
retrieve his or her e-mail or can this be the SMTP server through which
I wish to send the e-mail? My initial testing seems to suggest the
former. Is the latter possible? If so, how do you authenticate
yourself to the SMTP server through which you are sending the e-mail?
Thanks for any and all help.

-Vincent


  #4  
Old June 15th 06, 09:55 PM posted to microsoft.public.outlook.program_vba
Dan Mitchell
external usenet poster
 
Posts: 58
Default CDO and SMTP Servers

wrote in
oups.com:
You can specify a SMTP server in the code. My questions is, does this
SMTP server have to be the SMTP server that the recipient uses to
retrieve his or her e-mail or can this be the SMTP server through
which I wish to send the e-mail? My initial testing seems to suggest
the former. Is the latter possible? If so, how do you authenticate
yourself to the SMTP server through which you are sending the e-mail?


It definitely doesn't have to be the server that the recipient uses --
the whole point of SMTP is that you send your mail off to the SMTP
server that the _sender_ uses, and then servers take care of getting it
from place to place until it arrives at the recipient's server, and then
the recipient gets it from there however they do that.

So as long as you know that the person running the _sending_ code can
send mail through the smtp server specified in the code, you're okay.

If the person running the sending code may vary, things are more
complex. You have two options:

1. Let them enter the server that they would usually use (and then deal
with getting that info into your code).

2. Use a fixed server -- but this is risky, because then the fixed
server has to be open to everyone (ie spam) or use authentication, and
I'm not sure how you do authentication with CDOSYS -- there may be
something in schemas.microsoft.com somewhere, though.

-- dan
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook doesn't connect to POP3/SMTP servers when using WiFi Jim F Outlook - Installation 3 June 1st 06 05:12 PM
OE locks up with invalid POP3 and SMTP servers Jimmy Ho Outlook Express 5 May 25th 06 05:04 AM
mapi cdo service [email protected] Outlook - General Queries 8 February 20th 06 02:33 PM
Do i need Exchange for CDO A. Peters Outlook and VBA 4 February 17th 06 11:52 PM
Is it possible to define 2 SMTP servers without adding a new identity? Jimmy Ho Outlook Express 3 January 28th 06 01:32 PM


All times are GMT +1. The time now is 10:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.