Formatting mailmessage.body by string concatenation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?UGFzcXVhbGU=?=

    #1

    Formatting mailmessage.body by string concatenation

    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.Bod y = "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
  • =?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?=

    #2
    Re: Formatting mailmessage.bod y by string concatenation

    Pasquale wrote:
    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.Bod y = "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.

    --
    Göran Andersson
    _____
    Göran Anderssons privata hemsida.

    Comment

    Working...