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)
 on checking status of SQl Mail

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-03 : 10:03:19
sachin writes "Hello all,
I have checked the SQL Mail article.
I also have used it in my project.
I have used StartMail,StopMail and SendMail stored procdures.
When every time a user fills in a form it triggers StartMail stored procedure which starts the SQLMail. Then I call SendMail procedure which sends a mail to that user (the acknowledgement mail). After that StopMail procedure is triggered to stop the SQLMail service.
But if, in case, 2 users submit the form almost simultaneously then there are chances that one session (in case of 1st user) can trigger the StartMail, SendMail and StopMail procedures properly but while doing that the first session might stop the SQLMail service for second session (for 2nd user).
And hence second session may not be able to send the mail successfully.
Is this condition possible?
If it is, then could you please tell me the remedy for that.
Or is there any way to avoid this calamity? If yes, kindly tell me that also.

Can I check the status of SQLMail service (start or stop) before sending the mail through it?
(i.e. If it is already "start" then I can call SendMail S.P. or else if it is "stop" then I can call StartMail S.P. and then SendMail S.P.)

Is it possible? If yes, please tell me that also.

Thanking you,

sachin"

Jay99

468 Posts

Posted - 2002-04-03 : 11:59:54
Why stop the mail client?

Jay
<O>
Go to Top of Page
   

- Advertisement -