Questions tagged [database-mail]

is a component of Microsoft SQL Server for sending e-mail messages.

Database Mail is a component of Microsoft SQL Server for sending e-mail messages directly from the SQL Server Database Engine.

95 questions
0
votes
1 answer

Schedule SQL Job by Mail

do anybody know how to trigger a SQL job in Microsoft Management Studio when a certain E-Mail will be received? Thanks in advance
Markus
  • 1
  • 1
0
votes
1 answer

Email data from several tables which is joined with inserted table

I have four tables: Activity: ActivityID(PK) ActivityName CustomerID(FK) UserId(FK) 1 Lead Gen 1st 50 U1 2 Lead Gen 2nd 60 U2 Customer: CustomerID(PK) CustomerNumber …
Nesma Huda
  • 29
  • 1
  • 5
0
votes
1 answer

SQL - Configure Database Mail

I'm having a issue with my database mail not showing my new profile I created. I'm executing this: Execute msdb.dbo.sysmail_add_account_sp @account_name = 'email here', @email_address = 'email here' , @display_name = 'White Box…
mholmes
  • 177
  • 2
  • 14
0
votes
2 answers

Send email via SQL Server Agent, based on the result of a T-SQL stored procedure

I have a T-SQL stored procedure (which returns a single scalar value called @HourDifference as an output parameter); you can see the execution below: DECLARE @HourDifference_output TINYINT; -- I declare a variable to capture the output…
0
votes
1 answer

got an error on an procedure, sql send mail not working

so, i have this code, for a procedure. the code is below: EXEC msdb.dbo.sp_send_dbmail @profile_name = 'SQL-PHC', @recipients = 'filipeferreira@mass.pt', @query = 'SELECT no, nome, obrano, convert(varchar,datafinal) FROM bo …
questionador
  • 111
  • 1
  • 3
  • 12
0
votes
1 answer

Database mail is not working in SQL Server

I have created a proc to send mail with attachment (attachment is from query result) while running manually it working fine Scheduled proc using Job. Where in job it is not sending any mail. Also job is not failing Checked in sysmail_allitems but…
vignesh
  • 1,414
  • 5
  • 19
  • 38
0
votes
1 answer

MSDB is growing due to our sending database mail with attachments. Can I update MSDB system table 'attachment = NULL'?

sysmail_attachments is growing and using a lot of space for backups. I don't want to keep what's in the attachment, just the record of the mail, including recipients and attachments. I am considering running the below on our live system but don't…
cloudsafe
  • 2,444
  • 1
  • 8
  • 24
0
votes
1 answer

Migrate SQL Server database to Azure along with database email and jobs

I am new to SQL Azure, we have taken the subscription of Azure SQL elastic pool. I have two databases in my local SQL Server and it has a stored procedure which internally is calling msdb.dbo.sp_send_dbmail and I have scheduled these stored…
junior
  • 15
  • 1
  • 5
0
votes
1 answer

SQL server not sending email

I'm trying to use SQL server database mail, but it's not sending any test emails. here is my set up page:
Conor8630
  • 345
  • 1
  • 17
0
votes
1 answer

Sent status database mail with gmail

I have a problem with Database mail, which we are currently trying to change accounts for a database mail with a gmail account. The problem is when I try to send an email with the wrong email account, the sent_status is always "Sent" in the…
0
votes
0 answers

SQL Server: DB Mail Not getting triggered after certain Size

I am sending csv file from SQL Server using below query. EXEC @RtnCode = sp_send_dbmail @profile_name = 'Mail', @query_result_separator=@Separateur, @recipients = 'xxx@xxx.com;', @subject = @mailSubject, @query = @STMT, …
Erma
  • 337
  • 1
  • 6
  • 14
0
votes
0 answers

Unexpected blank spaces in Mail body generated via sp_send_cdosysmail

I'm facing a strange problem with sp_send_cdosysmail OLE Automation. I have a store procedure that will convert a temp table into html table and send them as mail body to distribution list. Problem is when the no of lines are more than 100 (x 13…
0
votes
0 answers

SQL Server sp_send_dbmail not sending body in email to sms

I am attempting to send an email to a text message number using the sp_send_dbmail stored procedure in SQL Server (both 2008 R2 and 2016 give the same results). Even if I send a test email from the server test tool, the body of the email is not sent…
Brian Swart
  • 922
  • 1
  • 9
  • 25
0
votes
1 answer

SQL server(2016) database email not working

Here is the sql-server version I'm using: Microsoft SQL Server 2016 (RTM-GDR) (KB4019088) - 13.0.1742.0 (X64) Jul 5 2017 23:41:17 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows Server 2016 Standard 6.3 (Build…
Sandie
  • 869
  • 2
  • 12
  • 22
0
votes
1 answer

SQL Server Email Error Handling

I need to log the error message if SQL Server failed to send its DB Mail. All the DB Configuration is done and email is also working fine. In case if any error, how can I get the error message from msdb.dbo.sp_send_dbmail?
user6631188