HTML email signature showing up as raw html code - html

I've created an HTML email signature, which displays fine by itself in a browser but when I paste it as my signature in my email client (roundcube) all the recipient of my email sees is the raw html code.
I tried adding body tags but am unable to come up with a solution.
Am I missing something simple, as I haven't coded an HTML signature before.
The structure of the signature is simple and is basically:
<div>
<img></img>
<p></p>
<p></p>
</div>

image is self closing <img /> in stead of <img></img>

Turns out my client along with some other no doubt aren't capable of displaying html code. So I have to stick with a boring plain signature.

Related

Display HTML from Form on a page as HTML instead of HTML Code

I'm creating a node app with mongodb.
I'm using TinyMCE in textareas for input. When I save it to the database and want to show it somewhere on a page, I see the HTML Code (<p>This is a paragraph</p>) instead of the actual rendered HTML.
When I console.log() the item from the ejs file I get this:
<p>Hello</p>
<p>I was here:</p>
<p>Link</p>
But when I look into the source code of the page I see this:
<p>I was here:</p>
<p>Link</p>
Any ideas?
So here is the solution:
In ejs there is the <%- for unescaped values, which I forgot.
https://ejs.co/#docs

HTML tags with spaces

so I have a strange request. I've been working on some security project for school, and I've been able to successfully inject some html code using a form on our test site. What's interesting is that it only accepts the html code as one line and with no spaces. This brings me to my question, so far I've only been able to get text and font color changes to work. But I want to see if someone could inject images/audio/video.
I'm trying to figure out how to turn this:
<img src="http://www.rtur.net/blog/image.axd?picture=2011%2F12%2Fcss.png"/>
Into this:
<imgsrc="http://www.rtur.net/blog/image.axd?picture=2011%2F12%2Fcss.png"/>
but add a space with code.
I've tried adding the but that only works with actualy text and not the tag itself. Any help is appreciated.
Interesting note: I was able to inject <font size="50" color="red"></font>
But I have no idea why that works but the image doesn't.
Have you tried the following?
A slash:
<img\ src="http://www.rtur.net/blog/image.axd?picture=2011%2F12%2Fcss.png"/>
Using a non-traditional closing tag:
<img src="http://www.rtur.net/blog/image.axd?picture=2011%2F12%2Fcss.png"></img>
Injecting a blank <img> tag:
<img src=""/>
Here's another solution: Try inline CSS:
<div style="background:url(http://www.rtur.net/blog/image.axd?picture=2011%2F12%2Fcss.png);height:400px;width:400px"></div>
See this fiddle: http://jsfiddle.net/9MYrM/

img align attribute being stripped - tumblr api

I am creating a new text post using tumblr's Python API, but when I check the html source for the created post it has stripped the align attribute from my img tags.
Here is a simple example of what I am running:
CLIENT.create_text(BLOG_URL, state='publish', body='<img src="http://ia.media-imdb.com/images/M/MV5BMTAyMjQ3OTAxMzNeQTJeQWpwZ15BbWU4MDU0NzA1MzAx._V1_SX214_.jpg" align="left" />')
Here is the resulting html for the post:
<p><img alt="image" src="http://ia.media-imdb.com/images/M/MV5BMTAyMjQ3OTAxMzNeQTJeQWpwZ15BbWU4MDU0NzA1MzAx._V1_SX214_.jpg" /></p>
Any clues as to why this is happening?
I believe Tumblr does some sanitation on any content when a post is created. I believe this is down to the content is shared amongst multiple sites.
For reference align is deprecated in HTML 4.01: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Img

Gmail replacing img with span in html email

I'm trying to give a client a HTML email template so that they can just edit text. However when i send them the template in Gmail. The images will just show as "logo.jpg" for example.
I view the source and it's replaced the <img> tag with <span>logo.jpg</span>
This is the HTML i wrote:
<img width='200' src='http://www.example.co.uk/images/logo.JPG'></img>
Anything wrong with this? Is this across all email clients?
Yes. Images don't have closing tags.
<img width='200' src='http://www.example.co.uk/images/logo.JPG' />

Setting css properties on HTML email

I'm sending an automatic html email from my website. In my email I set some text to red color and the font to a certain font type. When I view the html email from yahoo mail, The red color is applied, but the font is not applied. Why is it?
Also, when I try to view the html source code of the yahoo mail web page, I cannot find my html email content on this html source code. why is it?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<h2 style="color: #CC0000; text-align: center;">
Welcome to the Dave's Photo Album</h2>
<p>
Hi <%UserName%>,</p>
<p>
Thanks for registering. Here is your new user name and password:</p>
<p>
User Name: <%UserName%>
</p>
<p>
Password: <%Password%>
</p>
<p>
Enjoy!
</p>
You can use css inline only, and from my experience you need to do it with tables, since not all email services (none maybe) understand divs that well, I also recommend to stay within 600 px wide for the template, since its usually displayed in "panes" like yahoo mail, gmail, outlook etc. there's a lot of material you can check over at this page:
http://www.campaignmonitor.com/css/
there's no html, body or title declaration, just start with <table></table> like if was your body.
outlook 2007 will probably be the one with the most restraints.
good luck
In css, you can use font or font-family to change the font. I don't see anything that would actually change the font in your code there!
http://www.w3schools.com/css/css_font.asp
Don't send email in HTML. It is much more likely to be flagged as spam if you do.