The css padding is not working in outlook

Unfortunately, when it comes to EDMs (Electronic Direct Mail), Outlook is your worst enemy. Some versions don’t respect padding when a cell’s content dictates the cell dimensions. The approach that’ll give you the most consistent result across mail clients is to use empty table cells as padding (I know, the horror), but remember to fill … Read more

How do I format a String in an email so Outlook will print the line breaks?

I’ve just been fighting with this today. Let’s call the behavior of removing the extra line breaks “continuation.” A little experimenting finds the following behavior: Every message starts with continuation off. Lines less than 40 characters long do not trigger continuation, but if continuation is on, they will have their line breaks removed. Lines 40 … Read more

Send Outlook Email Via Python?

import win32com.client as win32 outlook = win32.Dispatch(‘outlook.application’) mail = outlook.CreateItem(0) mail.To = ‘To address’ mail.Subject=”Message subject” mail.Body = ‘Message body’ mail.HTMLBody = ‘<h2>HTML Message body</h2>’ #this field is optional # To attach a file to the email (optional): attachment = “Path to the attachment” mail.Attachments.Add(attachment) mail.Send() Will use your local outlook account to send. Note … Read more

Image style height and width not taken in outlook mails

Put the width and height in separate attributes, with no unit: <img style=”margin: 0; border: 0; padding: 0; display: block;” src=”https://stackoverflow.com/questions/20989897/images/img.jpg” width=”120″ height=”150″> Another Option: <!–[if gte mso 9]> <style type=”text/css”> img.header { width: 600px; } /* or something like that */ </style> <![endif]–>

mailto link multiple body lines

You can use URL encoding to encode the newline as %0A. mailto:email@address.com?subject=test&body=type%20your%0Amessage%20here While the above appears to work in many cases, user olibre points out that the RFC governing the mailto URI scheme specifies that %0D%0A (carriage return + line feed) should be used instead of %0A (line feed). See also: Newline Representations.