Sunday, February 19, 2012

How to send mail through SQL Server...

Hi,
I have a requirement of sending mail through SQL Server through SMTP port... But, I dont want to configure my database server as e-mail client...
Is there any way to do it...
Thanks in advance...You can use the procedure xp_sendmail to send email. I'm not sure what you mean with 'client', but sqlserver won't take the place of outlook, pegasus mail or some other email client you have.|||For SQL Server to use xp_xxxmail it MUST be configured as a MAPI-complient client (as the poster noted). To avoid that you can use this:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=670&lngWId=5|||I have also used vbSendMail from www.freevbcode.com with a lot of success. Again, you have to write a stored procedure to "wrap around" the DLL, but it works quite well.

Regards,

hmscott|||I would also go the CDOSYS way that rdjabarov suggests, then you don't need to worry about other things than the SQL part...

Here is another link that might be worth checking out:
http://support.microsoft.com/default.aspx?scid=kb;en-us;312839&sd=tech|||True, its hassle-free than direct SQL Mail procedures.

No comments:

Post a Comment