February 16, 2004 at 3:22 pm
Hi there,
Does anyone know of a solution where I can send messages automatically from a server to a few desktop PC's. I'm basically looking for a solution which is a beefed up "net send" that has a pretty interface on the desktops like windows messenger.
Thanks in advance...
February 19, 2004 at 8:00 am
This was removed by the editor as SPAM
February 20, 2004 at 1:03 pm
THis is a quick and easy way to send messages that relies on email.
CREATE PROCEDURE [dbo].[sp_sendAlert]
@From varchar(100),
@To varchar(100),
@Subject varchar(100),
@Body varchar(4000),
@cc varchar(100) = null,
@BCC varchar(100) = null
AS
Declare @MailID int
Declare @hr int
EXEC @hr = sp_OACreate 'CDONTS.NewMail', @MailID OUT
EXEC @hr = sp_OASetProperty @MailID, 'From',@From
EXEC @hr = sp_OASetProperty @MailID, 'Body', @Body
EXEC @hr = sp_OASetProperty @MailID, 'BCC',@BCC
EXEC @hr = sp_OASetProperty @MailID, 'CC', @cc
EXEC @hr = sp_OASetProperty @MailID, 'Subject', @Subject
EXEC @hr = sp_OASetProperty @MailID, 'To', @To
EXEC @hr = sp_OAMethod @MailID, 'Send', NULL
EXEC @hr = sp_OADestroy @MailID
GO
To run it just execute the following:
exec umpost.dbo.sp_sendAlert 'from@xxx.tld','to@xxx.tld','sbj','body'
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply