I have tried multiple variations of the following code, but I still get the same result. I am trying to have the last line “Issue Description: ….” to appear on a new line.
I have tried vbCrLf, vbCr, and & Environment.NewLine & _
None of which work.
Does anyone else have any suggestions?
Just a note: The other emails are properly formatted. Also, if I add put 2 vbCr (s) at the end of the ‘Issue Title’ line then it looks normal.
This one in particular seems to be a thorn in my side.
The result:

The code:
Dim mail As New MailMessage()
Dim strbody As String
strbody = Nothing
'set the addresses
mail.From = New MailAddress("email.address@server.com")
mail.[To].Add(Email_Add)
'set the content
mail.Subject = Issue_Num & " Issue has been created."
strbody = "Your issue has been created." & vbCr & vbCr
strbody += "The Issue Team has received the following issue: " & vbCrLf
strbody += "Issue ID: " & Issue_Num & vbCrLf
strbody += "Issue Title: " & Email_Summary & vbLf
strbody += "Issue Description: " & Description & vbCrLf
mail.Body = strbody
'set the server
Dim smtp As New SmtpClient("mailhost.mailserver.com", 15)
'send the message
smtp.Send(mail)
When I use the following code:
'set the content
mail.Subject = Issue_Num & " Issue has been created."
strbody = "Your issue has been created." & vbCrLf & vbCrLf
strbody += "The Issue Team has received the following issue: " & vbCrLf
strbody += "Issue ID: " & Issue_Num & vbCrLf
strbody += "Issue Title: " & Email_Summary & vbCrLf & vbCrLf
strbody += "Issue Description: " & Description & vbCrLf
I get this:

Make the mail format into HTML like this:
And then add an html break tag (
<br />) where you want a line break.