 |
| SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

April 8th, 2004, 05:33 AM
|
|
Registered User
|
|
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
I have modified my code based on the URL given by you. Here is the new code, but it is not working. Could you please have a look at it? And also what is the use of this parameter ".Item(cdoSendUsingMethod) = cdoSendUsingPort", because i have to try this in my local exchange server.
Dim objCDO
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
Set objCDO = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = <exchangeservername>
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPconnectiontimeout) = 10
.Update
End With
Set objCDO.Configuration = iConf
objCDO.From = " [email protected]"
objCDO.To = " [email protected]"
objCDO.Subject = "test"
objCDO.TextBody = "test"
objCDO.Send
'Cleanup
Set ObjCDO = Nothing
Set iConf = Nothing
Set Flds = Nothing
|
|

April 8th, 2004, 05:52 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Why did you leave out all the stuff with ("http://schemas.microsoft.com/cdo/configuration/smtpserver")?
You can take the example as is, replace just the bolded parts and it should work. If I were you, I'd try that first, and if it works, then change it to suit your situation.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

April 14th, 2004, 03:12 AM
|
|
Registered User
|
|
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
If I use the below mentioned link for SMTP server. Is there any problem ? Could you please explain me what is the use of this parameter ?
("http://schemas.microsoft.com/cdo/configuration/smtpserver")?
|
|

April 14th, 2004, 03:32 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
This parameter sets the SMTP server you want to use. The mail object will try to deliver your e-mail message at that server. This is where you should specify your Exchange server. AFAIK, that should work.
Did you try the example fro the article I showed you? If you just change the three bold parts in the code (and leave everything as is), it should work.....
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Broken Face by Pixies (Track 4 from the album: Surfer Rosa & Come On Pilgrim)
|
|

April 14th, 2004, 03:35 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Oh, and the "link" is not really a link. It's just a namespace for the smtpserver parameters. Something to make the param unique...
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Four Minutes by Roger Waters
|
|

April 14th, 2004, 04:00 AM
|
|
Registered User
|
|
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Is there any harm in using that link ? I have tried with that link, it is working fine. And I have also scheduled it. Thanks a lot for your help in this regard. Thanks.........
|
|

April 14th, 2004, 04:09 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
No, there is no harm, because like I said, it's not a link, but merely a means to make the smtp param globally unique.
As you can see, the link is enclosed in quotes which makes it an ordinary string.
Internally, this text is used to set and get the name of the SMTP server, but it will never go out on the Internet to reach the schemas.microsoft.com site.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: What time is love ? (The 1988 pure trance classic) by The KLF (Track 3 from the album: What time is love ?)
|
|
 |