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)
 How to send mails through xp_sendmail in sql2000?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-02-19 : 08:41:18
Pepsimalini writes "Dear Friends,
How to send emails through xp_sendmail in sql server?
Is there any configurations required?


EXEC master.dbo.xp_sendmail 'pepsimalini@indiatimes.com','hi'
i tried the above one ... but i got the following error

Server: Msg 18025, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x80040111

please let me know...
or please give me any related URLS ..

Thanks,
Malini"

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2004-02-19 : 09:14:28
Try This

Exec
Master.dbo.XP_sendmail
@recipients = 'pepsimalini@indiatimes.com',
@Subject = 'Test',
@message = 'hi'
---------------------------------------------

Check out BOL

Syntax
xp_sendmail {[@recipients =] 'recipients [;...n]'}
[,[@message =] 'message']
[,[@query =] 'query']
[,[@attachments =] 'attachments [;...n]']
[,[@copy_recipients =] 'copy_recipients [;...n]'
[,[@blind_copy_recipients =] 'blind_copy_recipients [;...n]'
[,[@subject =] 'subject']
[,[@type =] 'type']
[,[@attach_results =] 'attach_value']
[,[@no_output =] 'output_value']
[,[@no_header =] 'header_value']
[,[@width =] width]
[,[@separator =] 'separator']
[,[@echo_error =] 'echo_value']
[,[@set_user =] 'user']
[,[@dbuse =] 'database'



Jim
Users <> Logic
Go to Top of Page

u4cast
Starting Member

16 Posts

Posted - 2004-02-19 : 09:31:25
Is SQL mail working? Have you gone into the properties (Support Services) of SQL Mail and done a test?
Go to Top of Page
   

- Advertisement -