Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Sending SQL Notifications with CDOSYS Expand / Collapse
Author
Message
Posted Wednesday, May 11, 2005 9:11 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 18, 2010 11:45 AM
Points: 14, Visits: 4
Anyone?
Post #181492
Posted Wednesday, June 1, 2005 4:21 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 18, 2010 11:45 AM
Points: 14, Visits: 4
double bump
Post #186818
Posted Wednesday, November 2, 2005 10:15 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, August 27, 2012 11:42 AM
Points: 65, Visits: 50

I have also been unable to find an answer to this question. Can anyone answer this?

Post #234582
Posted Friday, February 1, 2008 12:59 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, February 1, 2008 12:48 PM
Points: 1, Visits: 0
I would like to reccomend to not send email by port using CDOSYS in a stored proceedure. There are problems with doing this which may not manifest until right away. If you do so, you will probably run into an issue when setting one of the items in the configuration's fields collection (ie an access violation). Its best to send via pickup directory when calling CDOSYS via a stored proceedure. Another alternative is to put the codd into a vb script and to call via DTS. Over all sending using a pickup directory of a locally installed smtp server is better than sending via port: the proc code won't have to connect to a remote server, it will be more reliable (still works and is relaible if the networks or remote server has issues or is down) and will be much faster since the code can fire-and-forget (CDOSYS will just write the message file out to the local directory and your code is done). The SMTP server will handle things from there. I know many people don't want to install SMTP on a SQL server, however it does not take up many resources/processing time, its a system component and you get a much better and reliable configuration.

A quick thing to remember for CDOSYS: 1 if by land (pickup) 2 if by sea (port)

You may want to read my blog posting on issues with using CDOSYS under a stored proceedure.

http://blogs.msdn.com/webdav_101/archive/2008/02/01/why-is-cdosys-failing-in-a-stored-proceedure.aspx

I'll probably add more to the above blog entry later....

Thanks,

Dan
Post #450729
Posted Thursday, January 15, 2009 10:44 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 8:34 AM
Points: 392, Visits: 396
Thanks You!
Works very well.
Regards, Emito.:D
Post #637392
Posted Wednesday, April 1, 2009 2:36 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, January 17, 2010 2:06 PM
Points: 1, Visits: 4
I have added several propertities to use google smtp as smtp server
But I get the error "Description: The server rejected the sender address. The server response was: 530 5.7.0 Must issue a STARTTLS command first. 28sm166958fxm.4"
It is rather strange cause I enabled SMTPUseSSL

Does any one have ideas?

EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/SendUsing").Value','2'
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value', 'smtp.googlemail.com'
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendusingport").Value', '465'
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/SMTPUseSSL").Value',True

-- SMTPAuthenticate
EXEC @hr = sp_OASetProperty @iMsg,
'Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").Value',1
--0 is do not authenticate
--1 is Use basic (clear-text) authentication. The configuration
--sendusername/sendpassword or postusername/postpassword fields are used
--to specify credentials.
--2 Use NTLM authentication. The current process security context is used
--to authenticate with the service. Integrated security.

EXEC @hr = sp_OASetProperty @iMsg,
'Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/SendUsername").Value','myAdr@gmail.com'

EXEC @hr = sp_OASetProperty @iMsg,
'Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/SendPassword").Value','myPass'
Post #688367
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse