send email from sql server express [closed]

2019-08-30 03:33发布

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.

3条回答
Anthone
2楼-- · 2019-08-30 04:00

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.

查看更多
3楼-- · 2019-08-30 04:06

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.

查看更多
我只想做你的唯一
4楼-- · 2019-08-30 04:07

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.

查看更多
登录 后发表回答