VML base64 image - outlook

I use html signature for Outlook 2007. The signature contains a few image file. I want embed image files so it's shouldn't be on attachment. But v:image doesn't show image.
<!--[if gte vml 1]>
<v:image style="width:104px;height:108px;" src="data:image/jpg;base64,/9j/4AAQSkZ......AgEAgEAgEAgEAgP//Z">
</v:image>
<![endif]-->
<![if !vml]><img width=104 height=108
src="data:image/jpg;base64,/9j/4AAQSkZJR...AICpUuZdbmkMBXsnT3knOxse8nkcs+B4iAtsAgEAgEAgEAgEAgEAgP//Z" alt="footer_logo.jpg" v:shapes="Resim_x0020_4"><![endif]>

Outlook uses Word to render the images, and Word does not support embedded (src="data:image") images. You need to attach the image as a file, set the PR_ATTACH_CONTENT_ID property on the attachment (Attachment.PropertyAccessor.SetProperty), and make sure your HTML refers to the image through the src=cid:xyz attribute (where xyz is the value of the PR_ATTACH_CONTENT_ID property).
PR_ATTACH_CONTENT_ID property DASL name is http://schemas.microsoft.com/mapi/proptag/0x3712001F

Related

thymeleaf html tag with img file extension wild card

I have a thymeleaf html tag that displays an image but the image could be a jpg or it could be a png.
Example
<img th:src="'http://localhost:8081/'+#{'/images/'}+${image}+'.jpg'"/>
I need to substitute the '.jpg' for a wild card extension so as to display either jpg or png
does anyone know what that piece of code at the end is?
Thanks
I don't think it is possible. Thymeleaf has no way to detect what is the type of the file and the browser need the full path of the file to show it.
I would advice to detect/add the file extension at the same place your set the ${image} value.
For example by converting the "image" variable to an object with "name" and "extension" fields
<img th:src="'http://localhost:8081/'+#{'/images/'}+${image.name}+${image.extension}"/>

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.

Is there any way to send html reports with all the files and css embedded in the body of the email rather than attachment in jenkins

See the image, it misses out on some CSS -
If report includes external or internal CSS, you try to convert them into inline css, then the mail will display with style, we did this by a nodejs package: inline-css
If report includes external image, you can try to replace the image src with data url like: <img src="data:image/png;base64,xxxxxxxxxxxx, you can search maybe there is some tool can did that for you.
Image data url for reference.
Another things need to consider, after convert image to data url and css to inline css, the report file size will increase and exceed your mailbox attachment file size limitation.
Including the image data in the URI never worked well for me when embedding the report in an email. Why not just reference the image URLs off the maven site instead. Like this....
img[src*="warning_sml.gif"]{content:url(http://maven.apache.org/images/icon_warning_sml.gif) !important;}
img[src*="error_sml.gif"]{content:url(http://maven.apache.org/images/icon_error_sml.gif) !important;}
img[src*="success_sml.gif"]{content:url(http://maven.apache.org/images/icon_success_sml.gif) !important;}
img[src*="maven-feather.png"]{content:url(http://maven.apache.org/images/logos/maven-feather.png) !important;}

To Show an tooltip on Image in Mvc3

I'm using asp.net MVC3 and i want to show a table containing information about a course
In that i have a field called "Information" which show an image.
I want to show the a tooltip when the mouse is taken on that image
I'm showing image lik this:
<img id="ok" src="../../Images/info.jpg" alt="tooltip"/>
I dont want to use any added plugin
can anybody help me with this?
Use title as well as alt in the Html tag
<img id="ok" src="../../Images/info.jpg" title="This is your tooltip message"/>
alt attributes on img elements are used as alternate text in case the image does not exist. Some browsers display these as tool tips when hovering over the image, but its not standard.
You could use the title attribute to display a tool tip on hover of the image.
You should always provide an alt attribute when using images, this is best for accessibility (screen readers read the alt text), and will fail XHTML if you don't have the attribute.

How do I add an image to an item in RSS 2.0?

Is there a way to send only an Image with a link and some alt text for each item in an RSS feed?
I looked at the enclosure tag but this is only for videos and music.
The enclosure element can be used to transmit pictures. The RSS 2.0 spec is quite clear about that, saying that the type is a MIME type. It does not say it is restricted to audio or video.
Here's an example: a set of photo feeds from Agence France Presse
One of solutions is to use CDATA in description
<![CDATA[
Image inside RSS
<img src="http://example.com/img/smiley.gif" alt="Smiley face">
]>
Note, that you may have a problem with hotlink prevented site.
This is possible in RRS2,
see
http://cyber.law.harvard.edu/rss/rss.html#ltenclosuregtSubelementOfLtitemgt
So you have to use the enclosure tag, to add media
You should use the enclosure tag within item to include the image. You can use it for images by setting the correct Mime Type (for example: image/jpeg) and including the image size as the "length" attribute. The length attribute doesn't need to be completely accurate but it's required for the RSS to be considered valid.
Here's a helpful article that discusses this and other options.
To work with the Mailchimp RSS to email feature, they expect the image to be specified in a <media:content> element inside <item>. This is their source for the feed item's image macro in their templates.
Thus, you need to add to the declarations
xmlns:media="http://search.yahoo.com/mrss/
Then inside the <item> element add
<media:content medium="image" url="http://whatever/foo.jpg" width="300" height="201" />
Without the extra declaration, the feed is invalid since media:content is not a known element.
Inside tag ITEM
<image:image xmlns:image="http://web.resource.org/rss/1.0/modules/image/">
http://domain. com/image.jpg
< /image:image>
Inside Description Tag
<![CDATA[
Some Text..
<br/><img src='http://domain. com/image.jpg' ><br/>
More Text
]]>
Regarding the <p> tag issue, You need to encode html within the xml.
Your code would look something like this:
<description><p> Text in the tag </p></description>
Since you are using php you can use htmlentities() to encode the html tags. They look horrible in the xml but RSS readers know what to do with it.
http://php.net/manual/en/function.htmlentities.php

Resources