0

Amazon Ses API を使用して E メールを送信するように C# Web API コードを設定しています。E メールの送信には成功していますが、受信した E メールでレンダリングされない本文内の HTML タグの使用で問題が発生します。以下はサンプルコードです--

const String from = "team.avesta@gmail.com"; 
String to = "vinaynb@gmail.com";
String subject = "SLM ";
String body = GetMailBody(aMailType, aParams);

private static string GetMailBody(MailType aMailType, MailParams aParams)
      {
         string body = "";
         const string newline = ("<br/>");
         body += "Dear Admin," + newline;
         body += "Your UserName is:" + aParams.UserName + newline;
         body += "Your password is : " + aParams.Password + newline;
         body += "Website is: http://demo2dev.com/" + newline;
         return body;
}



Destination destination = new Destination(){ToAddresses = new List<string>() {to}};

Content emailSubject = new Content(){Data = subject};

Content textBody = new Content(){Data = body};

Body emailBody = new Body(){Text = textBody};

Message message = new Message(){Subject = emailSubject, Body = emailBody};

SendEmailRequest request = new SendEmailRequest(){Destination = destination, Source =from, Message = message};

AmazonSimpleEmailServiceClient client = new AmazonSimpleEmailServiceClient();

client.SendEmail(request);

<br/>タグがメールに表示され、レンダリングされません。

<br/> タグがメールに表示され、表示されません。

ヘルプ..?

4

1 に答える 1