By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

Formatting mailmessage.body by string concatenation

P: n/a
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
Oct 4 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.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.

--
Göran Andersson
_____
http://www.guffa.com
Oct 4 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.