Outlook Email Signature - header? - html

I've been trying to get a particular design to work for an email signature without any luck, I have a feeling it's not possible, but perhaps someone has a solution.
The issue is that there is a small image that needs to be above the first line one types on. i.e.
[image]
[type here]
[signature details - e.g. phone no.]
If I make it normally, outlook always inserts a line break before the image and places the cursor there, I can't get the cursor to start after the image without clicking there (e.g. by pressing tab after typing subject).
I've tried making the image a background image of a div/span/table, I've tried using css to set the margin-top to a negative number, but the problem seems to stem from the fact that outlook inserts the signature after the div it creates for typing in.
Does anyone have a suggestion or is my task futile?

Which version of Outlook?
Try adding this to the image:
style="display:block;"
P.S - Backgrounds don't work in some versions of Outlook, unless you do some sort of conditional statements, you need to test how your e-mail renders in Microsoft Word (MSO rendering engine).
http://www.campaignmonitor.com/css/

You need to set on body a background-image and padding-top equal to the height of the image.
I did something similar a while ago to fix the "cursor problem" you mentioned. I don't remember which version of Outlook it was for, but nobody ever reported any problems with it.
As Kyle R mentioned, you should definitely test how your email renders with different clients.

An email can be a multipart message. This means the body can have multiple encodings. Each encoding comes with its own header:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=frontier
This is a message with multiple parts in MIME format.
--frontier
Content-Type: text/plain
This is the body of the message.
--frontier
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64
PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aGUg
Ym9keSBvZiB0aGUgbWVzc2FnZS48L3A+CiAgPC9ib2R5Pgo8L2h0bWw+Cg==
--frontier--
(example from here)
In most clients the default encoding is Content-Type: text/plain. Adding an image however switches the encoding to eg. base64.
Each new encodings starts on a new line. I assume this is causing you the trouble, since this automatically puts your text/cursor below the image.
One way to get around this would be to encode the entire message as html - the image as well as the text, using an img tag, inline.
Clicking next to the image lets you do this unknowingly, I assume.

Related

MS Outlook is removing hidden text in reply email

We have Ruby script that fetch and parse reply emails from our clients and putting them on appropriate client object in application.
For that purpose we send email to client with specific "hidden" code/id inside 1x1 pixel img tag (in similar way tracking pixel technology works) when clients reply to email, they quote our original email with code/id inside. And when we get client reply we can detect that hidden code from img tag, and process it accordingly. This works fine except when clients are replying from Outlook 2013.
Outlook 2013 removes image data containing code/id, and put something like "Image removed by sender." so we cannot detect see code/id anymore.
Also tried, making a image from base64 and even encoding code/id inside base64 image, but we got same result.
We tried different solutions, like making custom tags with class name contain code/id. Those custom tags are removed too, and replaced with something like < o:p >< /o:p >
We tried to put code/id inside invisible div, in inline css and various css tricks, and in this case Outlook just removes invisibility of div, and code/id is visible in email content.
There is a option that code/id is visible text inside body or subject, but we would like that this code/id be stays invisible to the clients.
It seems like its almost impossible to pass some hidden data trough reply email from MS Outlook.
Is there any way that we can pass this code/id trough reply email from outlook, without outlook removing it or making it visible?
Thank you.
Unless the data is visible (one way or another), chances are Outlook (or rather Word-light used for editing emails) will remove it.
White text on white background would probably work...
<img src=3D"https://t.yesware.com/t/58c8a29bcdf01103c9661815ef20eff8d=
f34a1b3/556ad713ae0cb0b15199a455f1fa5dfd/spacer.gif" style=3D"border:0; wid=
th:0; height:0; overflow:hidden;" width=3D"0" height=3D"0"><img src=3D"http=
://t.yesware.com/t/58c8a29bcdf01103c9661815ef20eff8df34a1b3/556ad713ae0cb0b=
15199a455f1fa5dfd/spacer.gif" style=3D"border:0; width:0; height:0; overflo=
w:hidden;" width=3D"0" height=3D"0">
I will address this dry-snitching code in a bit
Yesware is a paid service that allows you to track when and where the recipient of your email opens that email, every single time that they do or if they forward it to someone else, you will get the IP address and device type of each of those opens as well.
I've used Yesware for years, this is the first time that it has peeked it's little head out. In an email chain involving my Gmail hosted email and someone we will call Quarles. The first email I sent Quarles went normally, I received notification from Yesware that Quarles opened it from an iPhone. No further notifications came from YesWare which is impossible because he has replied twice.
I discovered in the latest email thread, under my second reply, Image removed by sender.Image removed by sender.
Below my third reply, Error! File name not specified.Error! Filename not specified.
I viewed the headers and, damn the luck, Quarles is using Outlook on a Mac Microsoft-MacOutlook/10.c.0.180410
What I am curious about is what Quarles sees on his end. Because the gif is not gone, the code is still there in our thread untouched. I know because if I open the email thread from another device (non-sending device) I get the notification that someone opened the email. So, what is preventing the code from calling home? Is it his MacOutlook? Is it an add-on he's got?
I am seriously considering having my husband write something better than Yesware. He's not a programmer but he is a SysAdmin so he'll figure it out. Besides, the stupid programs he has designed looked like crap anyway so why not write code for something that is supposed to remain unseen.
Oops, gotta go, if he catches me on stackoverflow he's gonna freak.. ;)

What is the recommended way for sending personalized images in html emails?

I know similar questions have already been asked but the answer is almost always the same: you need to share the image on a server and link to it from within the email.
For my purpose I cannot do that.
The image needs to be personalized for each user I send an email to (so the email will be dynamically generated for each user and will not always be the same. I cannot share the image -- since it will change but also for avoiding disclosure of users' information).
Have you ever encountered this scenario? Should I go with attachments or base64 encoding of images? Thoughts/experiences?
The HTML body must refer to the images using the content id (cid): <img src="cid:xyz">, where xyz is the value of the attachment content id (Content-ID) MIME header.
If you are creating the message directly in the MIME format, make sure the attachment is added to the message and its Content-ID MIME header is properly set. If you are Outlook Object Model or MAPI, you must set the PR_ATTACH_CONTENT_ID property on the image.
Since HTML5 allows base64 encoded images inline, this might be the easiest way to go. Check the following source: http://www.bigfastblog.com/embed-base64-encoded-images-inline-in-html
You should consider that not all mail clients might support HTML5 and therefore attaching the image and referencing it in your code may be the harder but better choice. Unfortunately I have no experience with that.
Edit: This tutorial looks promising, but I have not tried it: http://www.phpeveryday.com/articles/PHP-Email-Using-Embedded-Images-in-HTML-Email-P113.html

mailto link doesn't add Outlook signature in letter

I (and some folks) need to send a lot of similar e-mail's everyday. Using Outlook 2010 as mail client. Today I want to somehow simplify this process.
Thinking about html page with mailto links. Like:
Letter to someone
Letter to someone else
etc...
Problem is come out when I clicked on one of them. Outlooks "New message" window pops up, but without signature. It's only text from mailto link in body.
Can someone point out what I did wrong?
I'm trying to figure this out as well.
According to http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/Q_26410679.html you get either the body or the signature. I've tested this and removing my body text brought my signature back.
Alternatively, you can hardcode your signature into the body text.
Microsoft is not going to fix this bug. The workaround is to add it in the email body.
I believe the following MSDN article explains what you're describing: Messages that are created outside Outlook do not include the default Outlook email signature (KB 2544665)
Pretty sure you cannot customise a signature from the mailto: link.
The 2 ways to look at it is either setup your signatures in Outlook itself or, add the "signautre" to the bottom of the body included in the link?

Spaces in filenames used in URLs and image sources. Does the browser handle them or should I encode manually

I'm only asking because I tried sending an email (with PEAR) which containd an image whose name was something like "header image_3021" and noticed that it didn't show up in the email.
When I checked the SRC in the recieved email the space was replaced with + and that somehow made the link point to the wrong file. Now, IIRC, + is a correct encoding for spaces in URLs yet the browser could not locate "header+image_2031".
I checked the original content of the email both with Gmail's show original and in the server logs and the space was still there, so the replacement was done either by the browser or by Gmail's rendering process.
I have since modified my upload algorithms to not allow spaces in filenames but I have to ask: What's the best way to make sure the browser will display images with spaces in their file names? Replace them with %20 myself? Let the browser do it? Just disallow them?
Definitely encode them. By doing so, you remove the nuance of how different clients will interpret the string. As #mr alien said, there are out of box php functions that will handle that for you.

Correct email format for Email with Plain, HTML and an Attachment in SMTP?

The Problem:
I tried to copy the SMTP based headers/emails used by yahoo and hotmail and send them over Telnet, but the email I get does not display the included attachment, but it does display the message correctly.
What I suspect is causing it:
I believe I have the incorrect format for the email, and despite searching numerous articles online (as well as trying to grasp complicated and difficult to read RFCs), I have not found any helpful or concise articles that explain how to use all three (Plain, HTML and an attachment) in SMTP correctly. I've spent several days trying to alter the code, but I either get just the message (no attachment) or the entire SMTP Data body displaying (including boundaries, html code etc).
What I hoping to achieve via this question:
I'm hoping someone can look over the information I've gathered below, and be able to tell me what I am missing (or how exactly the formatting of the email is incorrect).
Debugging information:
I fed a duplicate of the information I sent to the SMTP server to file, and I've pasted the information to pastebin (with any personal information removed/edited out - the Base64 encoded attachment is just a text file of another email gotten from IMAP):
Information sent verbatim (minus control characters) to SMTP server:
http://pastebin.com/QYwzWT0S
What I see in the email client (note no attachment):
http://i45.tinypic.com/29b1zci.jpg
What IMAP sees when I download the email (note incorrect format):
http://pastebin.com/zv3PBr8N
What a correctly formatted email should look like to IMAP:
http://pastebin.com/3yBySbxU
I suspect SMTP is misinterpreting what I am sending, which is why the multipart/alternative is missing when IMAP tries to retrive the email. What exactly am I doing wrong? What does the server expect?
[Thank you for the upvotes - I can re-enable the links!]
I cleaned up the multipart boundary specifiers and got this, which works for me on my server (I've left off the SMTP commands here):
From: "Edited Out" <editedout#yahoo.com>
To: "Edited Out" <editedout#yahoo.com>
Subject: Testing 4
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="boundary-type-1234567892-alt"
--boundary-type-1234567892-alt
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Testing the text to see if it works!
--boundary-type-1234567892-alt
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>Does this actually work?</html>
--boundary-type-1234567892-alt
Content-Transfer-Encoding: base64
Content-Type: text/plain;name="Here2.txt"
Content-Disposition: attachment;filename="Here2.txt"
KiAxMyBGRVRDSCAoQk9EWVtURVhUXSB7NjU5fQ0KLS1fZjZiM2I1ZWUtMjA3YS00ZDdiLTg0NTgtNDY5YmVlNDkxOGRhXw0 KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PSJpc28tODg1OS0xIg0KQ29udGVudC1UcmFuc2Zlci1FbmNvZG luZzogcXVvdGVkLXByaW50YWJsZQ0KDQoNCkp1c3Qgc2VlaW5nIHdoYXQgdGhpcyBhY3R1
YWxseSBjb250YWlucyEgCQkgCSAgIAkJICA9DQoNCi0tX2Y2YjNiNWVlLTIwN2EtNGQ3Yi04NDU4LTQ2OWJlZTQ5MThkYV8 NCkNvbnRlbnQtVHlwZTogdGV4dC9odG1sOyBjaGFyc2V0PSJpc28tODg1OS0xIg0KQ29udGVudC1UcmFuc2Zlci1FbmNvZG luZzogcXVvdGVkLXByaW50YWJsZQ0KDQo8aHRtbD4NCjxoZWFkPg0KPHN0eWxlPjwhLS0N
Ci5obW1lc3NhZ2UgUA0Kew0KbWFyZ2luOjBweD0zQg0KcGFkZGluZzowcHgNCn0NCmJvZHkuaG1tZXNzYWdlDQp7DQpmb25 0LXNpemU6IDEwcHQ9M0INCmZvbnQtZmFtaWx5OlRhaG9tYQ0KfQ0KLS0+PC9zdHlsZT48L2hlYWQ+DQo8Ym9keSBjbGFzcz 0zRCdobW1lc3NhZ2UnPjxkaXYgZGlyPTNEJ2x0cic+DQpKdXN0IHNlZWluZyB3aGF0IHRo
aXMgYWN0dWFsbHkgY29udGFpbnMhIAkJIAkgICAJCSAgPC9kaXY+PC9ib2R5Pg0KPC9odG1sPj0NCg0KLS1fZjZiM2I1ZWU tMjA3YS00ZDdiLTg0NTgtNDY5YmVlNDkxOGRhXy0tDQopDQpmbHlubmNvbXB1dGVyIE9LIEZFVENIIGNvbXBsZXRlZA
--boundary-type-1234567890-alt--
The boundary specifier in a multipart email is any arbitrary text that's not likely to appear in the email body/attachments. When it shows up with two dashes in front, that specifies the beginning of new part (including the very first part. When it shows up with two dashes at the beginning and end, that specifies the end of the mail.
Your original mail had this "end boundary" marker in the middle of the mail (right after <html>Does this actually work?</html>), and had two different boundary markers (--boundary-type-1234567890 and --boundary-type-1234567892-alt). That explains why the attachment was left off.
It turns out the problem is incredibly subtle.
Hotmail conventionally (this was the original email I based it on ), uses the term "multipart/alternative" for multiple parts of the email. I used 'multipart/alternative' in my email.
It turns out yahoo does not like 'multipart/alternative' and will only correctly display the plain text, html and attachment correctly when instead the term 'multipart/mixed' is used (as I noticed yahoo compliant emails use this term instead of alternative), in combination with ejdyksen's suggestion (neither suggestion works by itself for yahoo's server though).
Although, technically speaking, this is the 'correct' answer, I will leave ejdyksen's answer selected because his efforts had shown it was some server-side technicality (his SMTP server and hotmail's both displayed the attachment, yahoo's didn't). Politely upvote ejdyksen's answer instead as he did most of the legwork.