私はこのような電子メールの外観を与えようとしています:
This is the looks of my email
メールの件名の右側は Ignou のロゴで、jpg 画像です。メールを送信するための次のクラスがあり、正常に動作しています。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Configuration;
using System.Net.Configuration;
using System.Net.Mail;
namespace ProductManagementweb.HelperClasses
{
public class SendEmail
{
public static int SendMail(string ReceiverAddress, string Recsubject, string Recbody)
{
try
{
System.Configuration.Configuration config = WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath);
MailSettingsSectionGroup settings = (MailSettingsSectionGroup)config.GetSectionGroup("system.net/mailSettings");
System.Net.NetworkCredential credential = new System.Net.NetworkCredential(settings.Smtp.Network.UserName, settings.Smtp.Network.Password);
//Create the SMTP Client
SmtpClient client = new SmtpClient();
client.Host = settings.Smtp.Network.Host;
client.Credentials = credential;
client.Timeout = 30000;
client.EnableSsl = true;
MailMessage mm = new MailMessage();
mm.From = new MailAddress(settings.Smtp.Network.UserName, "Support Team (Clique City)");
mm.To.Add(ReceiverAddress);
mm.Priority = MailPriority.High;
// Assign the MailMessage's properties
mm.Subject = Recsubject;
mm.Body = Recbody;
mm.IsBodyHtml = false;
client.Send(mm);
return 1;
}
catch (Exception ex)
{
throw ex;
}
}
}
}
上の画像のようなメール形式を指定するにはどうすればよいですか。html タグを使用して形式について言及する必要があることは確かですが、どこでどのように言及する必要があるかは不明です。したがって、どんな助けもきっとありがたいです。