Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: When I'm doing a CDONTS mail, can I use a remote SMTP-server?


Message #1 by robbin.gille@n... on Mon, 2 Jul 2001 10:45:44
I wonder if I somehow can use a remote SMTP-server when I'm doing 

CreateObject("CDONTS.NewMail")?



Robbin
Message #2 by Eli Schilling <eschilli@t...> on Mon, 2 Jul 2001 08:17:15 -0700
CDONTS cannot submit messages to a remote mail server. It requires a

local SMTP server running. If you want to do remote mail submission you

have to resort to CDOSYS (aka CDO for Windows 2000).



Here's a little CDOSZS snippet just to get you started (note that you

need to either declare the constants or use a metatag as described on

MSDN to get the constants working):



Set objConfiguration = CreateObject("CDO.Configuration")

Set objFields = objConfiguration.Fields

With objFields

	.Item(cdoSendUsingMethod) = cdoSendUsingPort

	.Item(cdoSMTPServerPort) = 25

	.Item(cdoSMTPServer) = "YourMailServer.YourDomain.Com"

	.Update

End With

Set objMessage = CreateObject("CDO.Message")

With objMessage

	Set .Configuration = objConfiguration

	.From = "YourOriginator@Y..."

	.To = "TheRecipient@T..."

	.Subject = "YourSubject"

	'.TextBody = "YourTextBody"

	.Send

End With



//This is from Siegfried in an earlier thread.  Hope it helps.



-Eli



-----Original Message-----

From: robbin.gille@n...

[mailto:robbin.gille@n...]

Sent: Monday, July 02, 2001 3:46 AM

To: ASP CDO

Subject: [asp_cdo] When I'm doing a CDONTS mail, can I use a remote

SMTP-server?





I wonder if I somehow can use a remote SMTP-server when I'm doing 

CreateObject("CDONTS.NewMail")?



Robbin






  Return to Index