Hi,

When ever i enter a record in a table, i want to send a mail to the administrator ( say admin@domain.com ) about the details of the inserted record.

I have written a Stored Procedure which gets the inserted record details and stores in a #table.

The coding i have used for sending the mail is given below:

xp_sendmail @recipients = 'admin@domain.com',
@message = 'See the attached html file for details...',
@query = 'Select * from #tbl_mailer',
@subject = 'Inserted Details',
@attach_results = 'true',
@no_header = 'true',
@attachments = '1.html'

I have Windows 2000 Adv Server installed in my machine with 128 mb Ram.
I have SQL Server 7.0 with Exchange Server installed.

The user profile works well when the mail is sent thru Outlook.
When ever i restart my machine, the above statement works in Ouery Analyzer but when i use my Stored Procedure, its goes on executing.

After a long time, i get message like Connection Time Out.

Is this problem with my machine or what?

Could any one can help me?

Thanks in Advance.

Maheswaran.