Questions tagged [senddbmail]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
104 views

Prevent users from sending an email attachment in sql server

In SQL Server, I want to restrict all users (except a few specific users) to send an email with attachment. For example, someone import data into excel file and send it via mail using the ...
Farid Zahidov's user avatar
0 votes
0 answers
95 views

Cannot send mail through SQL Server sp_send_dbmail. Certificate error

Below is the error message I see in windows event log. No errors while executing sp_send_dbmail Exception Information =================== Exception Type: Microsoft.SqlServer.Management.SqlIMail....
mk SQL's user avatar
  • 5
-2 votes
3 answers
4k views

Automate SQL Server reports and send them by mail

I work in a large retail business with a decent SQL Server environment. We have SQL Server replication, Availability Groups, Data warehouse, and some cloud services. In this beautiful environment, we ...
magdi's user avatar
  • 45
0 votes
0 answers
95 views

enable job results in a sp_send_dbmail error

On one of our production servers (SQL SERVER 2017 Enterprise) I get the following error whenever I right click and enable a Job in the SQL Server Agent: Alter failed for Job 'My Job'. (Microsoft....
Lumpy's user avatar
  • 2,109
0 votes
1 answer
743 views

SQL Server Management Send Mail as Part of a Job

I have a SQL Job that I would like to send an email through, but for some reason I can't get any details on why the email is not sending. This code works as expected when executed in the query window, ...
Danchat's user avatar
5 votes
1 answer
2k views

SQL Server Long Running Transaction - WAITFOR(RECEIVE conversation....DatabaseMail)

I have recently implemented an Agent Job which checks SQL Server every 10mins for any long running queries and if detected it will send out a mail to recipients with the information. However since ...
rdbmsNoob's user avatar
  • 449
-1 votes
1 answer
156 views

How to report on how many emails have been sent by sql server for a given period of time?

Is there a good way to determine how many emails have been sent by sql server (sql notifications + invocations of sp_send_dbmail by applications) for a given period of time? Need this info for ...
user2368632's user avatar
  • 1,087
1 vote
1 answer
642 views

sp_send_dbmail: Failing When Adding Attachment

I have a simple script that should send an attachment using send_dbmail. It works when I exclude the attachment or send a very small file, e.g. 5KB. The prod file I want to send is 280KB. Exec ...
Stockburn's user avatar
  • 429
0 votes
0 answers
299 views

How send email with "execute as user"

I need that all my system users can send email from the DB. not to assign everyone the role in the msdb database I created one login/user "send_mail", and grant permission on msdb db, ...
Diego Flores's user avatar