Database Mail is an enterprise solution for sending e-mail messages from the SQL Server Database Engine. Using Database Mail, your database applications can send e-mail messages to users. The messages can contain query results, and files from any resource on your network. Database Mail is designed ...

learn more… | top users | synonyms (1)

0
votes
0answers
10 views

End user configurable mailers based on queries [on hold]

We are required to send out a variety of mailers containing database rows (basically work items assigned to users) Ideally I would want to buy a solution that gives as much control as possible to ...
1
vote
1answer
28 views

Database Mail stops working after browser service stopped

After stopping the browser service on a 2-node SQL Server failover cluster system, the Database Mail component stopped working. It fails and creates log entries as follows: ...
1
vote
2answers
238 views

Send CSV file with db_sendmail

I am trying to send a csv file with 15000 records via the database mail in SQL Server 2014. The problem is that when I open my email the csv only contains 209 records. I have tried the same thing in ...
2
votes
1answer
198 views

Can SQL Server 2008 R2 get email name resolution from Office 365?

We just moved from an on premise Exchange server to Office 365's Exchange Online. My question is, is there any way to still get email name resolution from Office 365? I have many stored procedures ...
1
vote
1answer
29 views

Modifying the Contents of SQL Server Agent Alerts

As is generally recommended to do, I have Alerts configured for errors of severity 19 and greater that occur on my SQL Servers. However, as part of an email notification standardization process, I'm ...
1
vote
1answer
51 views

grant dbmail access to account

We have a server with a number of (increasing) databases, each of the "databases" needs to be able to use dbmail. Each (database's) mail account is different and configured via a custom ui. We created ...
1
vote
0answers
20 views

Grant permission to update dbmail

We want to grant a user the ability to update their own mail connection profile used by db mail in msdb. For example, when the IT company maintaining the mail server wants to change the password. We ...
3
votes
2answers
118 views

Assigning permissions for sysmail_update_account_sp

I have a Microsoft SQL Server 2014. The mail system is configured via DBMail and there is one stored proc in main web app (having its own database) which executes msdb's sysmail_update_account_sp by ...
0
votes
1answer
51 views

how to send email message with the results of a job?

I have the following update, that creates a table backup in a database called tablebackups with the records that are going to be updated, and then do 2 different updates. USE ...
2
votes
1answer
78 views

SQL job is completing without sending email to configured recipients

I have an SQL job completing without sending email to configured recipients. Here is the stored procedure I am using. Names changed accordingly. All other mail is getting sent via db mail through a ...
1
vote
1answer
36 views

Minimum permissions required for mail attachment in DbMail

I know that SQL DbMail requires for attaching, a windows login or a sysadmin privilege is required. This is somewhat similar to minimum dbMail permissions which was asked by me at an earlier point. ...
0
votes
1answer
57 views

Intermittent errors sending email from SQL Server Database Mail

I've been seeing some SMTP errors in my database mail logs. So I have a set up a test SQL Agent job that runs every ten minutes (it's only action is to SELECT NULL). It is set to send email ...
0
votes
1answer
34 views

Big difference between send_request_date and sent_date in sysmail_sentitems after running sp_send_dbmail,

A send DB mail process was executed on Friday: placed on the mail queue at 2016-03-04 12:21:22.937, it wasn't sent until 2016-03-04 16:00:01.000, 1311 seconds later. Usually ...
4
votes
1answer
1k views

Database Mail to Distribution List

I have a SQL Server 2005 which I have configured the database mail to setup monitoring alerts and notifications. I also create a email distribution list containing a couple of emails. The thing is ...
1
vote
0answers
46 views

Include failed step's error details in database mail for failed agent jobs

I receive database notification mail whenever a job fails. Error message of the failed job (Step Id=0 in the Job History) is included in the mail; MESSAGES: The job failed. The Job was invoked by ...
2
votes
2answers
38 views

Database email to know the history of backups

I need to send an email by listing different types of backups, time of backups, summary of these backups, backup file path and name of backup with the help of database email. Can anyone help me with a ...
0
votes
0answers
46 views

Issues with the @query parameter in sp_send_dbmail

When I use the following: select * from table A where repID in ( select repID from table B where id = 5 ) as the string I'm assigning to the @Query parameter. ...
1
vote
1answer
42 views

How to schedule emails out with SQL Server

I am creating an easy "service desk" web application with SQL Server as database. I have a table where the web application is inserting data which is used to send emails for alerting the users about ...
1
vote
2answers
33 views

How do I view operators in a Notify Operator task in a Maintenance Plan?

In the past, we have added each DBA to a Notify Operator task on failure in Maintenance Plans ranging from scheduled backups to indexing and occasionally one-off operations. One of our DBAs recently ...
0
votes
1answer
33 views

Altering failed job email

I'm looking for a simple solution: if you have a job with multiple steps and one step fails but the job is set to continue, is there a way for the SQL Agent email to say which step(s) in the process ...
10
votes
1answer
221 views

How to export the output of sp_AskBrent?

We have an instance that randomly spikes the CPU. I want to create an alert that fires on CPU over 90% and automatically calls a job that runs sp_AskBrent and emails me the output. However, the output ...
0
votes
1answer
37 views

Require to Send a formatted HTML Email via Database Mail in Sql Server 2008 R2

I need to send an e-mail from SQL Server in the below format, as requested by the client: Dear colleague, See attached file with your current list of high priority ticket notifications. Following ...
0
votes
1answer
112 views

Is it possible to configure multiple database mail id in single account name in sql server 2012?

I would like to say that as i want to configure multiple database mail in single account name in sql server 2012. This is SQL-Cluster-DB , so as per direction from head, If any sql job will fail , ...
1
vote
2answers
153 views

Is Database Mail worth the risk / a standard practice

I enabled Database Mail XPs and was testing it on my dev machine. I was just wondering if the DB Mail is a bad security choice, and if it more secure (or standard practice) to send this kind of ...
1
vote
0answers
30 views

SQL Server 2005 Database Mail Resends Historic Messages following SP4 Build 5324

I have applied SP4 Build 5324 to a SQL Server 2005 Enterprise active/passive cluster (Build pathway: 4053 to 5000 to 5324). The SQL Server log contains zero errors. The SQL Server Agent log contains ...
-1
votes
1answer
34 views

DB Mail Fails Even with no server changes

I am baffled as to how this was working before as their is no user account set-up. It was working this a.m., but now it is not? Is it possible to use send-mail w/o configuring an account within SQL ...
0
votes
1answer
1k views

Missing Database Mail Configuration Wizard in SQL Server 2008 R2

I was able to verify that Database Mail is installed and running but when I expand the management folder there is no Database Mail Configuration Wizard.
3
votes
2answers
1k views

SQL Server Database Mail - Why can't I run an execute against xp_sysmail_activate?

SQL Server 2008 R2 Standard x64 I can't send e-mail from this SQL Server (out of MANY that are configured pretty much identically AFAIK). I have created the mail profile and account. However, any ...
1
vote
1answer
114 views

Setting query to run as a stored procedure and email the results

I have the following query: select COUNT(CASE WHEN New_accounttype = 1 THEN New_AccountType ELSE NULL END) as 'New Connections' , COUNT(CASE WHEN New_accounttype = 2 THEN New_AccountType ELSE NULL ...
3
votes
0answers
1k views

SQL DatabaseMail smtp error 5.7.57 at one site, email works at another with the same details

I have several SQL databases on different servers. I have used a script to set up Database mail. EXECUTE msdb.dbo.sysmail_add_account_sp @account_name = 'Emailer' ,@description = 'Email out ...
0
votes
1answer
40 views

How to send an email with embedded values

I need to do a stored procedure that sends an email when a value reaches 100 with this wording in the body: "100 daily file downloaded from the user:USERID" where USERID is the user that reached 100. ...
0
votes
1answer
59 views

Sending an automated email through a nightly job

I had the following SQL query: select substring(PostOfficeBox,1,4) as 'Postcode' , COUNT(CASE WHEN New_accounttype = 1 THEN New_AccountType ELSE NULL END) as 'New Connections' , COUNT(CASE WHEN ...
2
votes
2answers
365 views

SQL-Server login-error of SQL-Server Agent Account

I have to manage a configured SQL-Server version 2005 and have setup Database Mail successfully - test mail works. Also I've changed the agent service to a domain user with (currently) domain admin ...
3
votes
0answers
230 views

sp_send_dbmail causes session to hang

We had an issue in production (2008R2 SP3) yesterday, where a developer was running a piece of code in SSMS that was executing sp_send_dbmail inside a transaction, and including an attachment from a ...
2
votes
2answers
15k views

Need to Send a formatted HTML Email via Database Mail in Sql Server 2008 R2

My requirement is to create the automated email as ( A formatted HTML Email via Database Mail) The basic requirement has been completed where when the Job is triggered it inserts the data into a Table ...
2
votes
2answers
4k views

sp_send_dbmail stored procedure send with attachment

I've been tasked with sending a small monthly report to for one of my customers. The report has previously been run manually on the instance, the output copied to a spreadsheet and send to the ...
-1
votes
2answers
3k views

sending email using database mail

How do I use database mail in SQL Server? I have followed many articles on the forums but I failed with many errors. I read in one book that I must have SMTP server and Microsoft Exchange installed ...
0
votes
0answers
601 views

DatabaseMail didn't start when an email is queued

This is about SQL Server 2005. I have configured SQL agent jobs to send an email when it failed. So far I have received email reliably. However, I have an weird problem where an email would get ...
4
votes
3answers
668 views

sp_send_dbmail fails when mailing queries, but no error returned, query just hangs

I have an issue SQL Server 2005. sp_send_dbmail fails when mailing out with the result of a query (inline or attatchment). No error message is given / reported, the query just keeps executing but ...
1
vote
2answers
598 views

How to delete list of email addresses from MySQL database?

I have a list of invalid email addresses parsed in the following format; There are roughly 1500 invalid addresses, and I need to remove them from my myBB users. What SQL query can I run to remove ...
2
votes
2answers
9k views

Problem sending an attachment using dbo.sp_send_dbmail

This question has been asked on the main stackexchange site I was referred here by a user there. ...
1
vote
0answers
151 views

Database Mail connection to exchange - Resets and timeouts

I am trying to send the results of a query in an email, and each time it takes longer than 5-10 minutes for me to recieve the message. The actual relay from Exchange takes less than one minute, but ...
0
votes
2answers
638 views

sp_send_dbmail with multiple reply_to addresses

I got this error when I specified multiple email addresses in reply_to The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 7 ...
2
votes
1answer
586 views

Enable Agent Database Mail - TSQL

I have several new servers that need Database Mail configured on them. I found the TechNet article describing how to add the profile and account via procedure calls, but is there a way to enable ...
1
vote
0answers
1k views

Database mail “Mailbox unavailable. The server response was: 5.7.1 Unable to relay for…”

I am getting this error on a named instance. I set up the account and profile. It is pointing to our internal anonymous smtp server. The IP address has been allowed to relay on the SMTP server. ...
0
votes
1answer
110 views

Sending one email when all jobs completes successfully

I need to create backup jobs over several instances, I wonder if there is any way to send a single notification via mail only when jobs from all instances completed successfully.
1
vote
1answer
92 views

How to configure database mail in sql server 2012 [closed]

when I configure the database mail it is showing the following error, what it means ?
2
votes
0answers
214 views

SQL Server Database Mail Log is flooded with errors (20-30 per second) when mail server goes down

We're using SQL Server 2005. Every so often our mail server goes down, and when this happens, as soon as our SQL code tries to send dbmail, the Database Mail Log has an item which looks like this: ...
0
votes
1answer
262 views

Use SQL Server Database Mail with Amazon SNS

Is it possible to configure SQL Server 2012 Database Mail (hosted on EC2) with Amazon SNS? I'd love a single place to manage all alert notifications and their subscribers in SNS, but Database Mail ...
2
votes
1answer
2k views

Error checking with sp_send_dbmail

This question is kind of multifaceted. First, what I'm trying to actually accomplish: I am in an environment where there is not really heavy data validation on inputs. So there is lots of opportunity ...