Comments on: Email template engine https://www.limilabs.com/blog/email-template-engine Using Limilabs .net components Fri, 15 Mar 2019 14:51:20 +0000 hourly 1 https://wordpress.org/?v=6.6.5 By: Limilabs support https://www.limilabs.com/blog/email-template-engine#comment-567193 Sun, 18 Aug 2013 10:34:32 +0000 http://www.limilabs.com/blog/?p=520#comment-567193 In reply to Martin.

@Martin,

Your HTML must include img tag with src attribute set to content-id of the attached image:

<img src="cid:logo@example.com" />

Also you need to add this image to Visuals collection:

MailBuilder builder = new MailBuilder();
builder.Html = @"<img src=""cid:logo@example.com"" />";
MimeData logo = builder.AddVisual(@"c:\image.jpg");
logo.ContentId = "logo@example.com";
IMail email = builder.Create();

Using fluent interface:

IMail email = Fluent.Mail
    .Html(@"<img src=""cid:logo@example.com"" />")
    .AddVisual(@"c:\image.jpg")
    .SetContentId("logo@example.com")             
    .Create();

You can find more details here:
https://www.limilabs.com/blog/send-html-email

]]>
By: Martin https://www.limilabs.com/blog/email-template-engine#comment-567005 Fri, 16 Aug 2013 23:45:18 +0000 http://www.limilabs.com/blog/?p=520#comment-567005 How would an html template look if I needed a logo image (jpg or png) in the signature part of the email ?

]]>
By: Send email to multiple recipients https://www.limilabs.com/blog/email-template-engine#comment-1435 Wed, 07 Dec 2011 14:41:15 +0000 http://www.limilabs.com/blog/?p=520#comment-1435 […] Also take a look at Mail.dll’s templating engine […]

]]>
By: Limilabs support https://www.limilabs.com/blog/email-template-engine#comment-1434 Tue, 24 May 2011 10:47:15 +0000 http://www.limilabs.com/blog/?p=520#comment-1434 In reply to Martin Staael.

@Martin

You can use Template.AddKey method:

string s = Template
    .Create("Show some number [key].")
    .AddKey("key", "42")
    .Render();

I’ve already implemented this feature, and it’ll be added in the next release.

]]>
By: Martin Staael https://www.limilabs.com/blog/email-template-engine#comment-1433 Tue, 24 May 2011 09:56:53 +0000 http://www.limilabs.com/blog/?p=520#comment-1433 I tried using DataFrom with a Dictionary but it doesn’t work. Would be nice to have

]]>
By: Uroš https://www.limilabs.com/blog/email-template-engine#comment-1432 Thu, 22 Jul 2010 06:40:27 +0000 http://www.limilabs.com/blog/?p=520#comment-1432 This is a very usefull thing and easy to implement thanks to your tutorial! Great job.

]]>