Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 796675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:40:37+00:00 2026-05-14T22:40:37+00:00

What I want to do is render a SSRS 2008 report as HTML (actually

  • 0

What I want to do is render a SSRS 2008 report as HTML (actually MHTML) and send that as the body in an email.

Has anyone done this? I’ve almost got it (I think) but I seem to have a encoding problem. The email shows up as what looks like some sort of base64 encoding.

Like this: MIME-Version: 1.0 Content-Type: multipart/related;
boundary=”—-=_NextPart_01C35DB7.4B204430″ X-MSSQLRS-ProducerVersion:
V10.0.2531.0 This is a multi-part message in MIME format.
——=_NextPart_01C35DB7.4B204430 Content-ID: Content-Disposition: inline;
filename=”FollowUpNotification” Content-Type: text/html;
name=”FollowUpNotification”; charset=”utf-8″ Content-Transfer-Encoding: base64
PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNp…

Any ideas on what I’m missing?

Here is a code snippet:

myMail.BodyEncoding = System.Text.Encoding.UTF8;

myMail.IsBodyHtml = true;

WebClient client = new WebClient();

System.Net.NetworkCredential repAuthenticationInfo = 
    new System.Net.NetworkCredential(@"username", @"password");
client.Credentials = repAuthenticationInfo;

client.Encoding = System.Text.Encoding.UTF8;

string messageBody = client.DownloadString(
    "http://<<reportserver>>&rs%3aFormat=MHTML&Parameter=" + Parameter);

myMail.Body = messageBody;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:40:37+00:00Added an answer on May 14, 2026 at 10:40 pm

    System.Net.Mail doesn’t support sending MHTML email where the MHTML appears as the message (see this page where someone is attempting to send MHTML as email).

    The reason you are seeing the code is that messageBody is expecting HTML, while the code is feeding it an MHTML document. The string is not automatically unencoded.

    Here are some options:

    1. Change the format parameter from MHTML to HTML3.2 or HTML4.0. SQL Reporting Services will then give you RAW HTML.
    2. Send the MHTML as an attachment rather than inline.
    3. Use SSRS’s built in email Subscriptions feature as OMG Ponies suggested in the above comment.
    4. Put the MHTML inline as discussed in this question. You’ll likely want to buy a library to help with this.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to render an HTML-EMail and send it to our customers using some
I am using the ReportExecutionService web service to run an SSRS report that has
I want to render content that i have created locally using html component and
I want to render a profile user container that contains a list of labels
i want to render one of these sets of views: head body-$id1 foot OR
I want to render for facebook bot special data. I have og.html.erb <!DOCTYPE html><html><head>
I want to render equations to PNG files and embed them in the HTML
I have an asynchronous local SSRS 2005 report that is of variable height and
I have an SSRS report that's called up by a page with an ASP.Net
I want to Render HTML Code to an Image with C#. Can I do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.