Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2004
    Location
    Minnesota
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question on working with variables

    I'm working with CDONTS (Intranet site). I'm getting Variables from form on main page just fine (txt???). Where I'm having problems is with syntax I want to substitute mail@mail.net with the variable strCc and I'm not sure on syntax. Also if there is a better way to do this open to any advice.

    Thanks for any help in advance

    J.C.
    To learn is a good thing and today I hope to learn something new!


    Code:
    <%
       Dim myCDONTSMail
       Dim strFrom
       Dim strTo
       Dim strCc
       Dim strSubject
       Dim strMessage
       Dim lngImportance
    
       strFrom=request.form("txtFrom")
       strTo=request.form("txtTo")
       strCc=request.form("txtCc")
       strSubject = request.form("txtSubject")
       strBody=request.form("txtMessage")
       lngImportance = request.form("optImportance")
    
       Set myCDONTSMail = CreateObject("CDONTS.NewMail")
           myCDONTSMail.value("Cc") = "mail@mail.net"
           myCDONTSMail.Send strFrom,strTo,strSubject,strBody,lngImportance
    
       Set myCDONTSMail  = Nothing
       Write "Mail has been sent."

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Unless I misread your message (which is entirely possible ),

    Code:
    <%
       Dim myCDONTSMail
       Dim strFrom
       Dim strTo
       Dim strCc
       Dim strSubject
       Dim strMessage
       Dim lngImportance
    
       strFrom=request.form("txtFrom")
       strTo=request.form("txtTo")
       strCc=request.form("txtCc")
       strSubject = request.form("txtSubject")
       strBody=request.form("txtMessage")
       lngImportance = request.form("optImportance")
    
       Set myCDONTSMail = CreateObject("CDONTS.NewMail")
           myCDONTSMail.value("Cc") = strCc
           myCDONTSMail.Send strFrom,strTo,strSubject,strBody,lngImportance
    
       Set myCDONTSMail  = Nothing
       Write "Mail has been sent."
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #3
    New Coder
    Join Date
    Jan 2004
    Location
    Minnesota
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Roy, thanks but that was way to easy

    I was sure you needed at least a few special characters you know like
    a couple of % and maybe a <> or two and then add a few " in for good measure.

    Guess I should have just used the good old KISS method

    Thanks again
    J.C.
    To learn is a good thing and today I have learned two things!!

  • #4
    Senior Coder Morgoth's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada Remaining Brain Cells: 6
    Posts
    1,402
    Thanks
    2
    Thanked 1 Time in 1 Post
    That's what I was going to post, but I didn't understand what the question was. It seemed too simple...

    newkid, I am serious about this, if you wish to continue to ask questions on the forum and not get ignored by people, I suggest you learn the basics of ASP. (I am not trying to threaten you, just trying to warn you.)

    I am afraid that if you don't know the basics of ASP, you will have a terrible time asking new questions which can get very complicated for you if you don't understand how to turn a string into a variable.

    If you are really interested in learning ASP, and getting help with good solid questions. Questions like the above should be searched in goodle and aspin.com before posting on the forums.

  • #5
    New Coder
    Join Date
    Jan 2004
    Location
    Minnesota
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Morgoth, gota ya and your right I should have done a search, normaly I do. and actualy if I would have been thinking I knew how to use variables, I was already using them on that page as a matter of fact....

    It was a late nite, I was brain dead, and being lazy

    I was/it gets - frustraing at times trying to learn a dozen new things at once
    (IE: HTML, VBs, ASP, SQL, CSS, and what ever else) and then add work dead-lines on top of that (and to think this all started because I said "sure I'd like to work with the web pages, but I have to admit it's a blast and you guys are great help)

    thanks for the link "aspin.com" new one for me
    Last edited by newkid; 08-27-2004 at 03:32 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •