[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

looking for a way to send HTML formatted emails from a DTS package

Posted on 2005-04-21
4
Medium Priority
?
277 Views
Last Modified: 2010-03-19
I have DTS package that properly creates an output string that looks like:

<html>
<body>
<table>
<tr>
<th>Partner</th>
<th>PO_Number</th>
<th>PO_Control_Number</th>
<th>PO_Date</th>
<th>INV_Number</th>
<th>INV_Date</th>
<th>INV_Control_Number</th>
</tr>
<tr><td>BERGENT</td><td>044237856</td><td>044237856</td><td>04/20/2005</td><td></td><td></td><td></td></tr>
<tr><td>CARDT</td><td>Z4849410SV</td><td>000005231</td><td>04/21/2005</td><td></td><td></td><td></td></tr>
<tr><td>D&KHEALTH</td><td>2052516</td><td>6700001</td><td>04/20/2005</td><td></td><td></td><td></td></tr>
<tr><td>D&KHEALTH</td><td>2052517</td><td>6700002</td><td>04/20/2005</td><td></td><td></td><td></td></tr>
<tr><td>HDSMITH</td><td>050123456</td><td>000001211</td><td>04/21/2005</td><td></td><td></td><td></td></tr>
</table>
</body>
</html>

I am attempting to send an email using the DTS Send Mail Task, in which I want to display the information in table form.  What I get is just the text noted above.  What am I missing?  This is the last piece of the puzzle and I'm going nuts.

Any help would be greatly appreciated.  I know that for this is probably a cake walk for most of you, but since I have no hair left, I am going to assign a high point value just to get it over with.

Thanks in advance for you help.

KMS
0
Comment
Question by:KenMSchwartz
  • 2
4 Comments
 
LVL 28

Expert Comment

by:rafrancisco
ID: 13837358
For an email to be displayed like an HTML page, you have to set the content-type to "text/html".  Unfortunately, in DTS Send Mail Task, there is no option for you to be able to change this property.  An alternative is for you to create an html file and attach that in your email.
0
 

Author Comment

by:KenMSchwartz
ID: 13837471
rafrancisco,

Thanks for that suggestion.  I thought about that as well, but the client would like to see it in the body of the email.  Any other suggestions.
0
 
LVL 6

Accepted Solution

by:
graf0 earned 2000 total points
ID: 13837602
As a workaround to the unability of DTS Send Mail task to send HTML e-mails, you may want to consider using CDOSYS through stored procedure in SQL Server. There is a sp_ that allows you to send HTML formated e-mails deom within your SQL Server - you can call it from your DTS using Execute SQL task.
The description of how to use CDOSYS in SQL and code for the sp_ is here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;312839

HTH
0
 

Author Comment

by:KenMSchwartz
ID: 13838038
graft,

Outstanding solution.  Thanks
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question