Home All Groups Group Topic Archive Search About


Author
24 Feb 2005 10:24 PM
Auddog
I have a small problem, that I just can't solve.  I'm passing information
from a form, defining my variables which are then emailed to me.  I'm not
having problems send the email or anything like that.  My problem is
hopefully simplier than that.  I have the following line:

strTextBody = "this is a problem ticket from " & strFirstName & " "
&strLastName & " "

which defines the variable with the text / variables.  Currently this works
without problems.  I just want to be able to add to this line a line break
and another variable.  I've tried this layout:

strTextBody = "this is a problem ticket from " & strFirstName & " "
&strLastName & " <br> " & strComments & "

This doesn't work it only as <br> into my email.  Can someone offer another
why.  Thanks for you help.

A

ps - here is the complete code:

<%
DIM strFirstName, strLastName, strSubject, strComments, strTextBody
strFirstName = request.form("fname")
strLastName = request.form("lname")
strSubject = "reported computer problem"
strComments = request.form("description")
strTextBody = "this is a problem ticket from " & strFirstName & " "
&strLastName & " " %>

<%
'Case "CDOSYS"
'Use the CDOSYS component
sch = "http://schemas.microsoft.com/cdo/configuration/" 'new

Set cdoConfig = Server.CreateObject("CDO.Configuration") 'new

With cdoConfig.Fields 'new
..Item(sch & "sendusing") = 2 ' cdoSendUsingPort 'new
..Item(sch & "smtpserver") = "192.168.100.100" 'smtp server address here
..update 'new
End With 'new

Set objMail = Server.CreateObject("CDO.Message")

Set objMail.Configuration = cdoConfig 'new
objMail.From = "m***@mail.com"
objMail.To = "m***@mail.com"
objMail.Subject = strSubject
objMail.TextBody = strTextBody
objMail.Send

Set objMail = Nothing
Set cdoConfig = Nothing 'new
%>

Author
25 Feb 2005 12:12 AM
McKirahan
Show quote
"Auddog" <wil***@hotmail.com> wrote in message
news:#MCSq#rGFHA.1396@TK2MSFTNGP10.phx.gbl...
> I have a small problem, that I just can't solve.  I'm passing information
> from a form, defining my variables which are then emailed to me.  I'm not
> having problems send the email or anything like that.  My problem is
> hopefully simplier than that.  I have the following line:
>
> strTextBody = "this is a problem ticket from " & strFirstName & " "
> &strLastName & " "
>
> which defines the variable with the text / variables.  Currently this
works
> without problems.  I just want to be able to add to this line a line break
> and another variable.  I've tried this layout:
>
> strTextBody = "this is a problem ticket from " & strFirstName & " "
> &strLastName & " <br> " & strComments & "
>
> This doesn't work it only as <br> into my email.  Can someone offer
another
> why.  Thanks for you help.
>
> A
>
> ps - here is the complete code:
>
> <%
> DIM strFirstName, strLastName, strSubject, strComments, strTextBody
> strFirstName = request.form("fname")
> strLastName = request.form("lname")
> strSubject = "reported computer problem"
> strComments = request.form("description")
> strTextBody = "this is a problem ticket from " & strFirstName & " "
> &strLastName & " " %>
>
> <%
> 'Case "CDOSYS"
> 'Use the CDOSYS component
> sch = "http://schemas.microsoft.com/cdo/configuration/" 'new
>
> Set cdoConfig = Server.CreateObject("CDO.Configuration") 'new
>
> With cdoConfig.Fields 'new
> .Item(sch & "sendusing") = 2 ' cdoSendUsingPort 'new
> .Item(sch & "smtpserver") = "192.168.100.100" 'smtp server address here
> .update 'new
> End With 'new
>
> Set objMail = Server.CreateObject("CDO.Message")
>
> Set objMail.Configuration = cdoConfig 'new
> objMail.From = "m***@mail.com"
> objMail.To = "m***@mail.com"
> objMail.Subject = strSubject
> objMail.TextBody = strTextBody
> objMail.Send
>
> Set objMail = Nothing
> Set cdoConfig = Nothing 'new
> %>
>
>

<br> is a line break in HTML.

Your e-mail is in plain text.

Change "<br>" to vbCrLf.

AddThis Social Bookmark Button