send email from sql server express [closed]

£可爱£侵袭症+ 提交于 2020-01-16 16:12:26

问题


i want to send an email as a user inserts some data into a table. is this possible in sql express? please help with the code.

i would use a trigger for insertion on the table. for email what features shall i have on my PC. i have Windows XP.


回答1:


As far as I know, SQL Express does not support the Database Mail feature, so this would not be possible out of the box. As per the note at the bottom of the Database Mail MSDN article for Sql Server 2008 R2:

Database Mail is not available in SQL Server Express.

A more robust solution would be to embed the notification logic in the application tier (e.g C#) which talks to the database.




回答2:


As far as I didn't find any deprecation against enabling SQL CLR onto SQL Server Express,

you can try to use SQL CLR Trigger with System.Net.Mail objects.




回答3:


This is not possible with SQL Express. If you happen to update to the full management studio you would use msdb.dbo.sp_send_dbmail to send your email.



来源:https://stackoverflow.com/questions/5296032/send-email-from-sql-server-express

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!