PDA

View Full Version : vbCrlf,"<br>"


michaelwall
12-12-2005, 04:17 PM
I have a mailing script.
I receive the textarea box replace the line break with br tags as below

sEmailBody = Replace(Request.Form("txtBody"),vbCrlf,"<br>")

The issue I have is that when the email is sent in HTML format for even code such as

<table>
<tr>
<td>
test
</td>
</tr>
</table>

the html appears a few lines down the email rather than right at the top where I want it. When I remove the replace function then the lines don't format properly. Anyone help?

BarrMan
12-12-2005, 04:31 PM
Function strFormat(str)
If IsNull(str) Or IsEmpty Then Exit Function
str = Replace(str,"VBCrlf","<br>")
strFormat = str
End Function

Response.write strFormat(sEmailBody)