newbie question

Discussion in 'ASP General' started by Auddog, Feb 24, 2005.

  1. Auddog

    Auddog Guest

    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 = ""
    objMail.To = ""
    objMail.Subject = strSubject
    objMail.TextBody = strTextBody
    objMail.Send

    Set objMail = Nothing
    Set cdoConfig = Nothing 'new
    %>
     
    Auddog, Feb 24, 2005
    #1
    1. Advertising

  2. Auddog

    McKirahan Guest

    "Auddog" <> wrote in message
    news:#MCSq#...
    > 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 = ""
    > objMail.To = ""
    > 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.
     
    McKirahan, Feb 25, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jerry C.
    Replies:
    8
    Views:
    253
    Uri Guttman
    Nov 23, 2003
  2. Kruno Saho
    Replies:
    0
    Views:
    147
    Kruno Saho
    Apr 7, 2013
  3. Dave Angel
    Replies:
    0
    Views:
    128
    Dave Angel
    Apr 7, 2013
  4. rusi
    Replies:
    0
    Views:
    116
  5. Miki Tebeka
    Replies:
    0
    Views:
    86
    Miki Tebeka
    Apr 7, 2013
Loading...

Share This Page