Hi
On the confirmation of a booking, I'm sending an email using web.mail, however, I've got a bit of a problem with it. I'm returning a block of data from SQL so I'm retruning it as one string with ";" as line separators so when I'm in .net I can process it. I'm then replacing ";" with a vbcrlf. If I use 1 vbcrlf the email text remains as one block. If I use 2 vbcrlf's I get a 2 lines between each line of text. I need to keep it in plain text so the mails can be easily read on all platforms.
Any help would be greatly appreciated
Lbob
This is the code I've got
Dim oMail As New System.Web.Mail.MailMessage
Dim sSubject As String, sBody As String, sEmail As String
oMail.BodyFormat = MailFormat.Text
sSubject = "Confirmation"
sDetails = Replace(sDetails, ";", vbcrlf & vbcrlf)
sBody = sDetails & vbcrlf
oMail.To = "xxxx"
oMail.From = "xxxx"
SmtpMail.SmtpServer = "xxxxxx"
oMail.Priority = MailPriority.Normal
oMail.Subject = sSubject
oMail.Body = sBody
SmtpMail.Send(oMail)
On the confirmation of a booking, I'm sending an email using web.mail, however, I've got a bit of a problem with it. I'm returning a block of data from SQL so I'm retruning it as one string with ";" as line separators so when I'm in .net I can process it. I'm then replacing ";" with a vbcrlf. If I use 1 vbcrlf the email text remains as one block. If I use 2 vbcrlf's I get a 2 lines between each line of text. I need to keep it in plain text so the mails can be easily read on all platforms.
Any help would be greatly appreciated
Lbob
This is the code I've got
Dim oMail As New System.Web.Mail.MailMessage
Dim sSubject As String, sBody As String, sEmail As String
oMail.BodyFormat = MailFormat.Text
sSubject = "Confirmation"
sDetails = Replace(sDetails, ";", vbcrlf & vbcrlf)
sBody = sDetails & vbcrlf
oMail.To = "xxxx"
oMail.From = "xxxx"
SmtpMail.SmtpServer = "xxxxxx"
oMail.Priority = MailPriority.Normal
oMail.Subject = sSubject
oMail.Body = sBody
SmtpMail.Send(oMail)