Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7907367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:23:43+00:00 2026-06-03T11:23:43+00:00

I want to create my own email template without having to use third party

  • 0

I want to create my own email template without having to use third party software,I would just like to clear up some basics for my self 🙂
Firstly, do all email templates come down to pretty much being HTML body with inline CSS? Thus sending a templated email with C# would go somthing like:

SmtpClient smtpClient = new SmtpClient("smtphost");
MailMessage msg = new MailMessage();
msg.To.Add("toaddress6@place.com");
msg.Subject = "A TEMPLATE";
msg.Body = "<body> This is where the html goes O.o </body>";
msg.From = new MailAddress("fromaddress@anotherplace.com");
msg.IsBodyHtml = true;
smtpClient.Send(msg);

Secondly, sending images with a template I’m assuming they are either added on as an attachment or are linked to via a long address to the image location on the server, similar to a webpage? and displayed in the html.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:23:44+00:00Added an answer on June 3, 2026 at 11:23 am

    Here’s some solutions I have ran into while creating email templating systems:

    • There’s no built-in templating system built into the framework that I know of. I built a system that worked pretty well in the past. Nowadays I do things simply. I would replace items like {year} with the current year, {year2} for a 2-digit year OR {year:2,} which is more work, but results in any of your variables to have the ability to do an inline SubString() without much work past the initial build. (you could do {var:name:upper}, :lower, :titlecase; you can pass in an object and use simple reflection techniques to read all the public properties and do automatic replacements… the sky is the limit!) The important thing is to give yourself a lot of leeway without violating the YAGNI principle too much. When you’re building a system like this…

    • Start with examples of how you want to end up. I ended up writing something like <html><body><h1><font face="arial">Hello, <b>{var:firstname}!</b> It's {hour} {ampm} here...</font></h1> ...</html> which would do the replacements and spit out the final copy. Then, check using a regex that everything was replaced so you’re not sending out Hi, null null! It's nice to see you at {hour} {ampm}! and make you the laughing stock of your recipients. Think hard about how you want to be able to insert content. You can do lots of crazy things with your own templating system, good and bad, so TEST TEST TEST. Unit tests are handy for regression testing. Remember, once you go live, you don’t want to make mistakes since you’re sending them to the customer and there’s no way of changing it before the client sees it like you can do with a web site.

    • Most HTML newsletters are in HTML format, use inline-CSS or (gasp!) TABLEs and FONT tags for layout. The reason behind this is because most email HTML rendering engines are stuck in the past. What works with Thunderbird may work somewhat well with Mozilla, but will look like garbage in GMail or Hotmail. My recommendation is to use as little inline CSS as possible, and if you do, test with a few email clients, including web- and non-web-based clients to make sure you get the desired effect in each one. Use TABLEs for layout, no fancy CSS3 stuff. The KISS rule applies here, and yes, it’s a blast from the past using the old-style HTML. You may feel like you need to take a shower after writing that horrible code, using tables for layout, etc., but that’s what we need to do with what we are given.

    Read this too: http://www.hongkiat.com/blog/design-perfect-newsletter/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a MFMailComposer like UITextField like when we type an email
When I want to extend an existing Object I create my own and use
I want to create own filetype to save objects in my app. Basically, I
I want to create my own IM and I'm searching an open-source IM APIs.
I want to create my own event - OnPositionChange . Event implementation of course
I want to create my own component which consists two other panels. One of
I want to create my own PHP web app where people can signin with
I want to create my own kind of a SeekBar which means I want
I want to create my own custom collection type. I define my collection as:
How can you make the .xla file if you want to create your own

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.