HTML Email Invite sent to outlook does not show border - outlook

I am sending a email invite from apex class. The email body is a HTML Body with a table in it.
The borders of the table are not visible in email invite sent. I am viewing the invite from outlook.
I tried send the following different HTML code as body but none work:
<table border="1">
<table style="border:1px solid black;">
style tag with border to each td, tr .
Please help to have border visible in the email invite sent.

Appointment items don't have the HTML body. They use RTF for bodies.
Anyway, Outlook uses Word as an email editor. You can read about supported and unsupported HTML elements, attributes, and cascading style sheets properties in the following series of articles:
Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007 (Part 1 of 2)
Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007 (Part 2 of 2)

Related

Outlook img tag is not giving me the correct attachment id

Im trying to create a new outlook add-in that can extract the email content as html, and extracting the email content is working fine Office.context.mailbox.item.attachments
But my problem right is, If there an img tag include to the content. It will give me like this kind of img tag
<img class="x_w-1378 x_h-886" size="349452" data-outlook-trace="F:1|T:1" src="cid:9ea35d14-aa1e-47d6-9c5b-b31ced143981" style="max-width:100%">
<img width="643" height="359" id="x_Picture_x0020_1" src="cid:image001.png#01D8A327.B5A0B590" style="width:6.6979in; height:3.7395in">
I know there's an isInline properties and i can extract the base64 of the attachment.
Now question is, How would i know, if this img tag is for this attachment and vice versa? Like there's no indicator in img tag like this
<img id="AQMT12tasFGA....." src="cid:image001.png#01D8A327.B5A0B590" style="width:6.6979in; height:3.7395in">
Mime Content-Id header is used for In-line attachments, see https://www.ietf.org/rfc/rfc2392.txt for more information. Be aware, you can use EWS to get content ID values of attachments from Office web add-ins.

Outlook Ignores Width attribute or css property

I've seen this problem touched on in many questions but none have been specific enough to help me. So I hope it offends no one if I simplify it and ask again. Hope springs eternal!
Is it really IMPOSSIBLE to control the width of an image embeded in an email when Outlook renders it? I.e. control the width of an image for which the html code is
<img src="cid:seal">
I.e. when the html code expects an embedded image instead of one stored elsewhere.
[Note: "seal" is the content ID I assigned when creating the MimeBodyPart with the embedded image].
Details:
I use a Javamail application to send a multi-part email message. The body part is an html document. Another MimeBodyPart carries the image used in the html doc. I've simplified the html test to nothing more than a two column table with the left column for the image and the right column for text.
And absolutely NOTHING I have tried has been able to control the size of the image when opened in OUTLOOK.
The image is always what I assume must be some native size for the image ... which is too big ... so it forces the first cell to be more than 15% wide. Or if I give the cell a fixed width the image overflows the box, i.e. get's clipped.
I put the basic code stripped of all font styling colors etc. below.
I have tried every combination of using width attributes and css style properties on the img tag. I've wrapped the image in another table ... or wrapped it in a div block inside the main table cell ... and even wrapped it in a div block inside a table cell inside the parent table cell. And I've tried specifying widths in fixed pixels and %'s.
It would really be nice if we all knew for sure if this is simply IMPOSSIBLE with Outlook.
Or if it is possible possible, to publish sample code that works. [It's hugely attractive to have the email open its images immediately, and not rely on the reader downloading them.]
NOTE: I seem able to control width when I load the image from an outside source afterwards, i.e.
Thanks for any help.
<html>
<head>
<meta name="viewport" content="width=980, initial-scale=1">
<title>Test Email</title>
</head>
<body style="width:100%; border:0;margin:0;padding:0;">
<table align="center"
style="width:980px; border-collapse:collapse;
margin-left:auto; margin-right:auto;">
<tr style="border:0; margin:0; padding:0;">
<td style="width:15%; border:0; margin:0; padding:0;">
<img src="cid:seal"
style="width:6em; height:auto;">
</td>
<td style="width:85%; margin:0; padding:.5em 0em 0em 0em; border:0;">
Some Titles and stuff
</td>
</tr>
<tr>
<td colspan="2" style="border:0; margin:0; padding:1em 1em 0em .5em;">
<p> 1st paragraph
....
<p> last paragraph
</td>
</tr>
</table>
With help from Eugene above, I discovered at least one good solution.
<img src="cid:seal" width="300" or "300px" of "15%"> DOES NOT WORK.
But when I ditched the quotes this worked
<img src="cid:seal" width=300 height=300>
It does of course mean setting width in % is still a problem since it requires quotes.
But I'll take what I can get. Email now pops open with logo without the user needing to download pictures. AND ... this css body selector also works rendering the background with an embedded image. [I stored the background image with a Content ID of"bkg".]
AGAIN ... unlike the img attribute src="cid:id" that uses quotes, url() requires the id w/o quotes.
<body style="background-image:url(cid:bkg);
background-repeat:repeat;
width:100%;
generic-family:Sans-serif;
font-family:Verdana;
border:0;margin:1em 0 1em 0;padding:0;">
Outlook uses Word as an email editor. The following series of articles provides reference documentation related to supported and unsupported HTML elements, attributes, and cascading style sheets properties:
Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007 (Part 1 of 2)
Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007 (Part 2 of 2)
You can design the page in Word and then save the resulted document as a web page. Thus, you will find the required HTML markup to use.

Why won't Outlook use the text/plain part?

First of all, hello,
With SwiftMailer, i'm sending HTML+PLAIN emails.
On outlook, when displaying this email as plain text, this is not my plain text part showing up, but a automatic parsed version of the HTML.
Does anyone know how to force Outlook to use the text/plain part of message when displaying plain text?
My code does the following:
$plain_body = convert_html_to_text($body);
$message->setBody($body, 'text/html')
->addPart($plain_body, 'text/plain');
$body has some formatting and images:
vardump($body);
<html>
<head>...</head>
<body>
<img src="logo.png" alt="Company name" /><br />
<img src="border.png" alt="border" /><br />
<img src="face.png" alt="Mr Somebody" /><br />
<p>Hello Ninj!
You requested a confirmation by email...</p>
<img src="footer.png" alt="footer" />
</body></html>
$plain_body contains a very clean text (thanks javon):
vardump($plain_body);
"Hello Ninj!
You requested a confirmation by email..."
But in the plain text version viewed in Outlook, i see instead all the alt attributes of pics of the HTML version, one by line, then some lightly formatted text:
Company Name
border
Mr Somebody
Hello Ninj!
You requested a confirmation by email...
Footer
Thank you by advance for everyone able to help :)
Can't do that. Outlook keeps all 3 body flavors (HTML, RTF, plain text) in sync. This is done on the store provider level.
When it receives a MIME message, it uses the HTML body (if available). When the message is saved, the store provider uses the HTML body to generate the plain text body (PR_BODY property).

Outlook 2010 overriding font-family from Arial to Times New Roman

I'm programmatically sending HTML-formatted email, and setting the font as Arial throughout (font-family: Arial;). When the messages arrive in Outlook 2010, text in table elements is in Times New Roman. Text in div elements is fine in Arial. If I View Source, copy into an HTML file, and view in a browser, all fonts function as expected (it's all Arial).
Some Google results show that Outlook will fall back to its default font (Times New Roman) when none is specified, but that's not what's happening here.
Why is Outlook forcing my email to display in Times New Roman when specified otherwise?
Even if you set font-family: arial to table, it still wont work. You need to specifically set the font for each td inside your table to get it right.
<!--[if mso]>
<style> body,table tr,table td,a, span,table.MsoNormalTable { font-family:Arial, Helvetica, sans-serif !important; }</style>
<!--<![endif]-->
The table in question was nested in a div that had font-family:Arial; in its style, but the table did not have a font set. So tables don't inherit fonts (and perhaps other things) from their containers in HTML emails in some clients.
This issue was happening from outlook 2007 and the previous solutions didn't work for me, the only solution that seems to work is wrapping the text with <font face="arial, sans-serif">My text with arial</font>
If you're working with Outlook 2007, you must define font-family on table . Otherwise it will set to default serif font.
The <font> tag is deprecated but since Outlook 2010 is removing (almost all) styles, this is the only way it works.
table.MsoNormalTable
{font-size:12.0pt;
font-family:"Times New Roman";}
Open your HTML with Text Pad, and change it to Arial.
None of above methods worked for me, using a custom font linked with #font-face. had to work with conditional tags for Outlook. Took me quite some time to figure out how exactly. So I've set up a code example: I was still having some troubles implementing this in my situation so I've shared a code example for this: https://stackoverflow.com/a/21626196/135654
You can put your style to "span" tag, It will works good.
<td>
<span style="font-family: "Times New Roman"></span>
</td>
I had the same problem....all text in the body of the email was Arial, but the table defaulted to word. I had to wrap the font in each each cell......time consuming..

Header size in monthview of Telerik Radscheduler

I want to increase the header size in month view of Telerik Radscheduler where (Sun, Mon, etc.) are displayed.
How to implement it??
Use FireBug or IE dev toolbar to inspect the rendered html of the month header and see which style from the embedded skins you have to override. I did that for one of the scheduler live samples and here is what I found (see the sections in asterisks):
<table class="**rsHorizontalHeaderTable**" style="**width: 100%; height: 25px;**" cellSpacing="0" cellPadding="0">----Month header week days-------------------</table>

Resources