Formatting mailmessage.body by string concatenation

  • Thread starter Thread starter Pasquale
  • Start date Start date
P

Pasquale

I want to send an email with smtpclient.
I have created a MailMessage with body obtained as concatenation between a
fixed string, that finishes with a space, and a string variable.
The code is as this:
MailMessage.Body = "Title " + strTitle.
The variable strTitle is read from a SharePoint list.
When I read the mail, I see that the space in the fixed string is lost.
Do you have any suggests to solve this issue? Thanks
 
Pasquale said:
I want to send an email with smtpclient.
I have created a MailMessage with body obtained as concatenation between a
fixed string, that finishes with a space, and a string variable.
The code is as this:
MailMessage.Body = "Title " + strTitle.
The variable strTitle is read from a SharePoint list.
When I read the mail, I see that the space in the fixed string is lost.
Do you have any suggests to solve this issue? Thanks

You have to determine where the space is lost. View the source code of
the mail to see if the space is there or not. If it's not, debug the
code that creates the mail to determine where in the code is goes away.
 
Back
Top