sp-send-dbmail Questions

6

I have a windows account with users group and trying to exec sp_send_dbmail but getting an error: profile name is not valid. However, when I logged in as administrator and execute the sp_send_dbm...
Heptateuch asked 16/8, 2010 at 6:30

2

Solved

I am using a trigger on a table to send an email using sp_send_dbmail. I want to include a file attachment in the email of an image type. The raw data for the jpeg is stored in the ndl_Image colu...
Thyself asked 13/9, 2010 at 12:22

2

I have a two part question relating to sending query results as attachments using sp_send_dbmail. Problem 1: Only basic .txt files will open. Any other format like .pdf or .jpg are corrupted. Pr...
Buttonhook asked 14/9, 2012 at 20:24

11

Solved

I am running a SQL query that returns a table of results. I want to send the table in an email using dbo.sp_send_dbMail. Is there a straightforward way within SQL to turn a table into an HTML tabl...
Jarmon asked 15/8, 2011 at 19:59

4

Solved

I have a SQL Server 2008 procedure that sends email via sp_send_dbmail. I'm using the following code: set @bodyText = ( select N'Here is one line of text ' + N'It would be nice to have this o...
Albritton asked 18/8, 2010 at 17:5

7

Solved

How can I send an email using T-SQL but email address is stored in a table? I want to loop through the table and be able to send email. I cannot find a good example of doing this so far.
Calefaction asked 9/11, 2012 at 1:35

1

Solved

This question is similar to several questions I've found where Line Feeds or carriage returns cause copying SQL grid results to Excel to have Line Splitting issues and your results will be cut off ...
Steatopygia asked 7/11, 2017 at 22:47

8

Solved

I have a stored procedure that is run every night which is supposed to send the results of a query to several recipients. However on most days it ends up sending a duplicate email a minute later. T...
Microphysics asked 20/3, 2013 at 11:0

8

Solved

I have faced with the following issue: when trying to send email with results of query attached as file, using sp_send_dbmail via executing ordinary query everything seems to be working OK. But if...

2

Solved

I have an SSRS report that I need to embed in the body of an email using the sp_dbmail stored proc in SQL Server. I'm able to do this using the front end of Outlook by attaching the .mhtml export o...
Forum asked 17/3, 2017 at 21:54

2

Solved

I am sending emails from SQL Server, and need to map the values of the sent_status column on the msdb.dbo.sysmail_mailitems table to something more descriptive. So far I have identified two values...
Ralfston asked 18/11, 2014 at 13:14

3

I've tried every avenue on every damn forum suggested, but to no avail! Need to send results of SQLPERF(logspace), that have been stored in a table, via sp_send_dbmail to recipient. Step 2 of job ...
Skelton asked 24/8, 2009 at 13:4

1

I'm trying to send an email using sp_send_dbmail. I need it to send one query as an attachment and another as part of the body of the email. The problem is that sp_send_dbmail only has one @query p...
Chukar asked 26/1, 2011 at 18:23
1

© 2022 - 2025 — McMap. All rights reserved.