Sending messages from SQL Server without SQL Mail

Sending messages from SQL Server without SQL Mail

Post by Raghuveer Shikaripu » Sat, 23 Nov 2002 23:29:35



Hi,

   We are using SQL 2000 on Win  2000 Server. We are at SP2 for windows 2000
and SP2 for SQL 2000. We  have a requirement wherein, We have to send a mail
or a page to a set of addresses if the database bacup job fails. This has to
accomplished without configuring or using SQL Mail.  I was taking a look at
the KB articles about achieving this. I found a very helpful KB article
titled 'HOW TO: Send E-Mail Without Using SQL Mail in SQL Server' which
suits my requirement just fine. As per this article it is achieved thru a
stored procedure created on Master db. But to tailor the code to suit my
situations, I think, I have to change the following lines in SP code that is
in the KB article:

-- This is to configure a remote SMTP server.
--
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdos...

'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendus
ing").Value','2'
-- This is to configure the Server Name or IP address.
-- Replace MailServerName by the name or IP of your SMTP Server.

'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpse
rver").Value', 'MailServerName'
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---

I just wated to make sure I am proceeding in the right direction or not. As
per my understanding the only change that I have to make is to replace the
string 'MailServerName' with a fully qualified servername or IP address of
the SMTP server that I will be using for the purpose of sending the mail in
the line underlined. I wanted to get opinions and feedback from guys having
tried this solution successfully. An early response would be very much
appreciated.

Thanks

Raghuveer S

 
 
 

Sending messages from SQL Server without SQL Mail

Post by Peter Feakin » Sat, 23 Nov 2002 23:41:12


Yes that's correct.



Quote:> Hi,

>    We are using SQL 2000 on Win  2000 Server. We are at SP2 for windows
2000
> and SP2 for SQL 2000. We  have a requirement wherein, We have to send a
mail
> or a page to a set of addresses if the database bacup job fails. This has
to
> accomplished without configuring or using SQL Mail.  I was taking a look
at
> the KB articles about achieving this. I found a very helpful KB article
> titled 'HOW TO: Send E-Mail Without Using SQL Mail in SQL Server' which
> suits my requirement just fine. As per this article it is achieved thru a
> stored procedure created on Master db. But to tailor the code to suit my
> situations, I think, I have to change the following lines in SP code that
is
> in the KB article:

> -- This is to configure a remote SMTP server.
> --

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdos...
> /_cdosys_schema_configuration_sendusing.asp


'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendus
> ing").Value','2'
> -- This is to configure the Server Name or IP address.
> -- Replace MailServerName by the name or IP of your SMTP Server.


'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpse

- Show quoted text -

Quote:> rver").Value', 'MailServerName'
> --------------------------------------------------------------------------
--
> --------------------------------------------------------------------------
--
> ---

> I just wated to make sure I am proceeding in the right direction or not.
As
> per my understanding the only change that I have to make is to replace the
> string 'MailServerName' with a fully qualified servername or IP address of
> the SMTP server that I will be using for the purpose of sending the mail
in
> the line underlined. I wanted to get opinions and feedback from guys
having
> tried this solution successfully. An early response would be very much
> appreciated.

> Thanks

> Raghuveer S


 
 
 

Sending messages from SQL Server without SQL Mail

Post by Gert E.R. Draper » Sun, 24 Nov 2002 18:50:12


See XPSMTP http://sqldev.net/xp/xpsmtp.htm


Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright ? SQLDev.Net 1991-2002 All rights reserved.



Quote:> Hi,

>    We are using SQL 2000 on Win  2000 Server. We are at SP2 for windows
2000
> and SP2 for SQL 2000. We  have a requirement wherein, We have to send a
mail
> or a page to a set of addresses if the database bacup job fails. This has
to
> accomplished without configuring or using SQL Mail.  I was taking a look
at
> the KB articles about achieving this. I found a very helpful KB article
> titled 'HOW TO: Send E-Mail Without Using SQL Mail in SQL Server' which
> suits my requirement just fine. As per this article it is achieved thru a
> stored procedure created on Master db. But to tailor the code to suit my
> situations, I think, I have to change the following lines in SP code that
is
> in the KB article:

> -- This is to configure a remote SMTP server.
> --

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdos...
> /_cdosys_schema_configuration_sendusing.asp


'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendus
> ing").Value','2'
> -- This is to configure the Server Name or IP address.
> -- Replace MailServerName by the name or IP of your SMTP Server.


'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpse

- Show quoted text -

Quote:> rver").Value', 'MailServerName'
> --------------------------------------------------------------------------
--
> --------------------------------------------------------------------------
--
> ---

> I just wated to make sure I am proceeding in the right direction or not.
As
> per my understanding the only change that I have to make is to replace the
> string 'MailServerName' with a fully qualified servername or IP address of
> the SMTP server that I will be using for the purpose of sending the mail
in
> the line underlined. I wanted to get opinions and feedback from guys
having
> tried this solution successfully. An early response would be very much
> appreciated.

> Thanks

> Raghuveer S

 
 
 

Sending messages from SQL Server without SQL Mail

Post by Raghuveer Shikaripu » Tue, 26 Nov 2002 18:49:47


Thank you very much for your replies. Solution provided in the KB article
worked. As I had stated in my original post, all I had to do was substitute
the string 'MailServerName' with a fully qualified servername or IP address
of the SMTP server. KB article no is 312839.

Cheers



Quote:> Hi,

>    We are using SQL 2000 on Win  2000 Server. We are at SP2 for windows
2000
> and SP2 for SQL 2000. We  have a requirement wherein, We have to send a
mail
> or a page to a set of addresses if the database bacup job fails. This has
to
> accomplished without configuring or using SQL Mail.  I was taking a look
at
> the KB articles about achieving this. I found a very helpful KB article
> titled 'HOW TO: Send E-Mail Without Using SQL Mail in SQL Server' which
> suits my requirement just fine. As per this article it is achieved thru a
> stored procedure created on Master db. But to tailor the code to suit my
> situations, I think, I have to change the following lines in SP code that
is
> in the KB article:

> -- This is to configure a remote SMTP server.
> --

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdos...
> /_cdosys_schema_configuration_sendusing.asp


'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendus
> ing").Value','2'
> -- This is to configure the Server Name or IP address.
> -- Replace MailServerName by the name or IP of your SMTP Server.


'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpse

- Show quoted text -

Quote:> rver").Value', 'MailServerName'
> --------------------------------------------------------------------------
--
> --------------------------------------------------------------------------
--
> ---

> I just wated to make sure I am proceeding in the right direction or not.
As
> per my understanding the only change that I have to make is to replace the
> string 'MailServerName' with a fully qualified servername or IP address of
> the SMTP server that I will be using for the purpose of sending the mail
in
> the line underlined. I wanted to get opinions and feedback from guys
having
> tried this solution successfully. An early response would be very much
> appreciated.

> Thanks

> Raghuveer S