Skip to content

Instantly share code, notes, and snippets.

.ibox { margin-bottom: 20px; }
.ibox .title { background-color: #dfdfdf; color: #3b3b3b; }
.ibox .title h5 { font-size: 18px; }
.ibox .content { background-color: #ffffff; padding: 15px; }
.ibox .footer { background-color: #dfdfdf; }
$primary-background: #ffffff;
$secondary-background: #dfdfdf;
.ibox{
margin-bottom: 20px;
.title {
background-color: $secondary-background;
color: #3b3b3b;
h5 { font-size: 18px; }
}
<div class="ibox">
<div class="title">
<h5>THIS IS TITLE</h5>
</div>
<div class="content">
THIS IS CONTENT
</div>
<div class="footer">
THIS IS FOOTER
</div>
<table cellspacing="0" cellpadding="0" style="width:100%">
<tr>
<td bgcolor="#f1efed" style="text-align:center;padding:20px 0;">
<table align="center" bgcolor="#ffffff" cellspacing="0" cellpadding="0" style="width:500px;">
<tr>
<td bgcolor="#f1efed" style="padding-bottom:20px; text-align:center;" >
<img style="width:220px;height:50px" src="data:image/png;base64,....." />
</td>
</tr>
<tr>
[HttpPost]
public async Task<IActionResult> SendMail()
{
try
{
//point to your wwwroot folder
string templatePath = $"{env.WebRootPath}/Templates";
//setup Razor Light Engine
var engine = new RazorLightEngineBuilder()
.UseFilesystemProject(templatePath)
[Route("upload/result")]
[HttpPost]
public async Task<IActionResult> UploadResult([FromForm]UploadImageModel model)
{
if(model.Files.Count == 0)
return BadRequest("result picture not found");
var file = model.Files[0];
if (file.Length / 1024 / 1024 > 2)