Hi
The status must be updated to "Close" only if the mail has been sent successfully right ?
If this is not the case then you can put both the select and update statements in a single procedure.
Otherwise do it separately ... This will ensure that status is updated only when a mail is sent.
"Keep Trying"