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
 SQL Server Development (2000)
 sp_SMTPMail is not working..

Author  Topic 

vijayasankark
Starting Member

3 Posts

Posted - 2006-02-16 : 18:16:37
I have tried the stored procedure "sp_SMTPMail". But it is not working for me. I think the problem may be in using the mail server parameter. I am using the mail server parameter with my IP Address. Is it fine? Please let me know the problem. It is very urgent.

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2006-02-16 : 22:04:45
vijay,
It's hard to say with the information you provided (or didn't provide)

Post the code you are using.
Describe how it "is not working".
Post any errors that you are getting

Be One with the Optimizer
TG
Go to Top of Page

vijayasankark
Starting Member

3 Posts

Posted - 2006-02-17 : 09:13:09
Hi,

Our requirement is to send mails directly from sql server. For that I am trying to use it for sample in Query Analyzer. The code used by me is..

exec sp_SMTPMail 'vishnu','vsheri@saipeople.com',
'sankar','vsankar@saipeople.com','hi','hi','192.1.254.104'

If execute the above query, I am getting a message command succesfully executed. But i am not getting any mail.

Please check the code and help me in finding a solution for this.

Thanks
Go to Top of Page

peter@KLM
Starting Member

6 Posts

Posted - 2006-02-17 : 09:49:09
This is the coding I tend to use for mailing

DECLARE @MailSubject varchar(80)
,@Recipient varchar(100)
,@Messagetext varchar(500)
,@Nextrun smalldatetime

/* set mail values */
set @Recipient = 'Valid Mail adressee'

set @MailSubject = 'Warning: blablabla.'

set @Messagetext = 'This is the message I have to let you know. '
+ char(13) +
'This is line 2'

EXEC master..xp_sendmail
@recipients = @Recipient
,@Message = @messagetext
,@Subject = @mailsubject


Hope this will help solving your problem.
Kind regards
Go to Top of Page

vijayasankark
Starting Member

3 Posts

Posted - 2006-02-17 : 10:53:02
Do we need SMTP Server to be configured for executing this Stored Procedure? In my system i haven't configured SMTP Server and my Microsoft Outlook, will it works now?

Thanks & Regards
Vijay
Go to Top of Page
   

- Advertisement -