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. Advertisements

  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. Advertisements

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. Jenny

    dotnet newbie question

    Jenny, Jul 13, 2003, in forum: ASP .Net
    Replies:
    9
    Views:
    1,387
    K_Lee
    Nov 6, 2003
  2. Alan S.

    Re: A newbie .NET question

    Alan S., Sep 4, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    982
    Jerry Dennany
    Sep 26, 2003
  3. Id0x
    Replies:
    4
    Views:
    1,444
    Erik Max Francis
    Jul 21, 2003
  4. cjl
    Replies:
    3
    Views:
    1,154
    John Nagle
    May 21, 2007
  5. JohnE

    newbie with newbie questions

    JohnE, Aug 17, 2009, in forum: ASP .Net
    Replies:
    3
    Views:
    765
    Gregory A. Beamer
    Aug 17, 2009
  6. Jerry C.
    Replies:
    8
    Views:
    576
    Uri Guttman
    Nov 23, 2003
  7. moonhkt
    Replies:
    2
    Views:
    350
    Chris Angelico
    Sep 16, 2012
  8. Dennis Lee Bieber

    Re: Newbie to python. Very newbie question

    Dennis Lee Bieber, Apr 7, 2013, in forum: Python
    Replies:
    1
    Views:
    154
    Miki Tebeka
    Apr 8, 2013
Loading...