If you are executing the procedure from front end then after the 1st select statement is executed the stored procedure skips all the other lines. I would suggest to get...
1. Should not be dependant on Outlook or MAPI components like Microsoft Exchange profile etc. Should be able to use POP3 or SMTP mail services to send mails.