Code:
Using System.Net.Mail;
.
Public class SmtpHelper: SmtpClient
{
.
Public string Send (string subject,
String body,
Bool isBodyHtml,
MailAddress from,
MailAddress replayTo,
ListThe to,
ListCc,
ListBCC,
MailPriority priority,
ListAttachments)
{
MailMessage message=new MailMessage ();
.
Message. The Body="three blanks: []";
Message. BodyEncoding=System. Text.. Encoding UTF8;
.
This. Send (message);
Invoke the SmtpClient Send (message) method, the result E-mail sent out, Spaces can be automatically merged into one,
The effect of the email sent to:
"Three blanks: []"
Try to use escape:
Message. The Body="three blanks: [& amp; have spent & amp; have spent & amp; have spent] ";
The effect of the email sent to:
Three blanks: [& amp; have spent & amp; have spent & amp; have spent]
Mail contents of continuous space is meaningful for the user, to have no the SmtpClient, really depressed, the great god of all stripes have a solution?