Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 xp_sendmail or sending mail via SMTP by sql

Author  Topic 

bilencekic
Posting Yak Master

121 Posts

Posted - 2006-09-01 : 09:53:13
how can i send mail using sql server via SMTP server ???
xp_sendmail doenst have a parameter for smtp i think
and sql server and mail server are on diffrent locations. for exapmle mail server iss 10.0.0.1 and sql server 10.0.0.2
Can i send mail using sql with SMTP server?

MS BLESS US

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-09-01 : 13:36:34
Take a look at
http://www.sqlteam.com/item.asp?ItemID=5003
Go to Top of Page

bilencekic
Posting Yak Master

121 Posts

Posted - 2006-09-08 : 09:48:39
what if the smtp server needs authentication?
where to enter username and password

MS BLESS US
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-09-08 : 11:19:17
Take a look at this article, it basically describes the same thing but uses the CDOSYS component which is in Windows 2000.
http://support.microsoft.com/default.aspx?scid=kb;en-us;312839&sd=tech

Now to authenticate you just need to set the username and password in the configuration by calling
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendusername").Value', "user"
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendpassword").Value', "pwd"

More on authenticating is discussed here
http://support.microsoft.com/default.aspx?scid=kb;en-us;555287
Go to Top of Page
   

- Advertisement -