login about faq

I am building a component that we will use for creating newsletters and mailing them. For the newsletter template I have html and I have a css-file. What is the recommended way of adding the css to the email? I succeed in adding the html to the mail, but the css, since it’s in a different mail, I don’t know how to handle.

asked Feb 22 at 10:09

chilkat's gravatar image

chilkat ♦♦
12.8k317363471


An external CSS file can be added to an email as a "related item", in the same way as an image file is added. The "href" attribute of the "link" tag in the HTML would use the CID of the CSS related item, or it would use the Content-Location of the related item. I'll create an example..

A simpler solution would be to use inline CSS within the HTML..

link

answered Feb 22 at 10:13

chilkat's gravatar image

chilkat ♦♦
12.8k317363471

Android: Send HTML Email with External CSS as Related Item

Classic ASP: Send HTML Email with External CSS as Related Item

C: Send HTML Email with External CSS as Related Item

Chilkat2-Python: Send HTML Email with External CSS as Related Item

C++: Send HTML Email with External CSS as Related Item

C#: Send HTML Email with External CSS as Related Item

C# UWP/WinRT: Send HTML Email with External CSS as Related Item

DataFlex: Send HTML Email with External CSS as Related Item

Delphi ActiveX: Send HTML Email with External CSS as Related Item

Delphi DLL: Send HTML Email with External CSS as Related Item

.NET Core C#: Send HTML Email with External CSS as Related Item

Excel: Send HTML Email with External CSS as Related Item

Visual FoxPro: Send HTML Email with External CSS as Related Item

Java: Send HTML Email with External CSS as Related Item

Lianja: Send HTML Email with External CSS as Related Item

MFC: Send HTML Email with External CSS as Related Item

Mono C#: Send HTML Email with External CSS as Related Item

Node.js: Send HTML Email with External CSS as Related Item

Objective-C: Send HTML Email with External CSS as Related Item

Perl: Send HTML Email with External CSS as Related Item

PHP ActiveX: Send HTML Email with External CSS as Related Item

PHP Extension: Send HTML Email with External CSS as Related Item

PowerBuilder: Send HTML Email with External CSS as Related Item

PowerShell: Send HTML Email with External CSS as Related Item

PureBasic: Send HTML Email with External CSS as Related Item

Python: Send HTML Email with External CSS as Related Item

Ruby: Send HTML Email with External CSS as Related Item

SQL Server: Send HTML Email with External CSS as Related Item

Swift: Send HTML Email with External CSS as Related Item

Tcl: Send HTML Email with External CSS as Related Item

Unicode C: Send HTML Email with External CSS as Related Item

Unicode C++: Send HTML Email with External CSS as Related Item

Visual Basic 6.0: Send HTML Email with External CSS as Related Item

VB.NET: Send HTML Email with External CSS as Related Item

VB.NET UWP/WinRT: Send HTML Email with External CSS as Related Item

VBScript: Send HTML Email with External CSS as Related Item

Xojo Plugin: Send HTML Email with External CSS as Related Item

link

answered Feb 22 at 10:53

chilkat's gravatar image

chilkat ♦♦
12.8k317363471

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×199
×2

Asked: Feb 22 at 10:09

Seen: 348 times

Last updated: Feb 22 at 10:53

powered by OSQA