|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, February 18, 2010 11:45 AM
Points: 14,
Visits: 4
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, February 18, 2010 11:45 AM
Points: 14,
Visits: 4
|
|
double bump
|
|
|
|
|
Valued 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?
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, February 01, 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
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Tuesday, April 30, 2013 8:33 AM
Points: 353,
Visits: 325
|
|
Thanks You! Works very well. Regards, Emito.:D
|
|
|
|
|
Forum 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'
|
|
|
|