Showing posts with label mail. Show all posts
Showing posts with label mail. Show all posts

Monday, March 19, 2012

AUtomatic mail alert

HI,

I have to send an automatic e-mail based on database table .Could any body help me

how to write stored procedure and where to execute it.How to send an automatic e-mail through sql server?

Thanks in advance.

Regards,

Raja.

Hi Raja,

To send an email in a stored procedure in SQL Server, you can call xp_sendmail directly.

http://msdn2.microsoft.com/en-us/library/ms189505(SQL.90).aspx

Before this, you have to configure an extended MAPI mail profile. Here is a link for how to do it.

http://msdn2.microsoft.com/en-us/library/ms175189(SQL.90).aspx

However, you can also read data from the database table and do this in your .net application, using the System.Net.Mail.MailMessage class.

http://msdn2.microsoft.com/en-us/library/system.net.mail.mailmessage.aspx

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

Thursday, February 16, 2012

Auto SQL Mail

Hi,

I have to generate mails automatically based on databse (SQL SERVER) table,In that table we have expirydate as one column and

based on expirydate I have to generate the mails automatically,Please guide me to solve this issue.

where we have to run the stored procedure.

Do we have to use jobscheduler?

please guide me how to use it

Thanks in avance

regards,

Raja.

Hi,

check following links ...

you have to schedule store procedure ...which will send mail ...

http://support.microsoft.com/kb/312839

http://www.sqlteam.com/article/sending-smtp-mail-using-a-stored-procedure

http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci1054928,00.html