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 8163713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:07:30+00:00 2026-06-06T19:07:30+00:00

I need to send an HTML report with images from an application. The report

  • 0

I need to send an HTML report with images from an application. The report is laid out and an image is embedded within the report. When I preview the report in a web view, it appears correct, when I receive it by GMail, the styling and image is missing.

There’s a CSS stylesheet embedded within the header.

I’m sending out a report like this:

NSString* htmlReportString = [ReportManager createReportWithEvent:event];
[mailController addAttachmentData:[htmlReportString dataUsingEncoding:NSUTF8StringEncoding] mimeType:@"text/html" fileName:@"report.html"];
[mailController setMessageBody:htmlReportString isHTML:YES];

Here’s what I get out of a .plist and append as a report header

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>template1</key>
    <string>
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;
&lt;title&gt;Report&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
.statHead {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: bold;
    color: #FFF;
}
.statSub {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: normal;
    color: #FFF;
}
.repHead {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #000;
}
.repSub {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: normal;
    color: #000;
}
.repLinks {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #000;
}
.repSubBullet {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: normal;
    color: #000;
    list-style-type: circle;
}
.repSubBold {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #000;
}
.topName {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 34px;
    font-weight: bold;
    color: #000;
}
.topDate {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    font-weight: bold;
    color: #000;
}
.topSub {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: normal;
    color: #000;
}
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;</string>
</dict>
</plist>

When I preview the report within iPhone’s web view, it appears correct – all styles are present, the image is present. But when I receive the report in GMail, the image is missing and none of the styles are showing. If I save the report and view it on my Mac’s preview app, the report is displayed correctly once again.

What is causing this issue? Is it an encoding/ backslash issue or does Gmail treat HTML differently than Apple’s web browsers?

  • 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-06-06T19:07:31+00:00Added an answer on June 6, 2026 at 7:07 pm

    You have escaped HTML specialchars in your HTMl code, &lt; etc. should be replaced to their official HTML equivalents, otherwise your HTML won’t work. That it’s working in the iOS browser sounds for me a bit strange.

    Of course it could be also another problem…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Sending HTML email from PHP I need to send an html mail
I need to send HTML emails directly from oracle PL/SQL package. This works almost
Need to generate an html report from XML and corresponding XSL butI have to
I need to send an image taken from the Camera over network. The image
We have a crystal report that we need to send out as an e-mail,
In my application I need to send and receive HTML in string form. I'd
I am using PEAR mail system to send authenticated mails.I need to send HTML
I am working on an HTML page where i need to send confirmation by
I have an html form. I need to send its data to flash on
We need send h264 from flash to Wowza and after to vlc by RTSP

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.