1

I have an email template in a file called template.html, how can i use it as mail body in asp.net?

1

2 Answers 2

3

There's a sample here with code.

Or you could use the MailDefinition class.

Sign up to request clarification or add additional context in comments.

Comments

3

You can use this:

File.ReadAllText("template.html")

//This is to read template.html then you can pass this through
//formatemail() function if you have or
//message.body = File.ReadAllText("template.html");

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.