Basic Question: Adding Lines to Email Body

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • brohan
    Forum Member
    • Jun 2008
    • 9

    Basic Question: Adding Lines to Email Body

    File.OpenEmail("[email protected]&Subject=Free $10 Starbucks Card for 7714 NE 104th&Body=I agree to answer the following questions to receive my FREE Starbucks card:Realtors Name (First and last)ate of Showing:[B]What did you think of the price?What did you like most about the home?Are you interested in purchasing this home?If not, why not?Your mailing address:Your phone number:Thank you for taking the time to answer these questions, you will receive your card in the mail shortly!", SW_SHOWNORMAL);


    With the above line of code, how do I seperate the various lines onto seperate lines of the email body? How do I insert the \n

    Thanks!
  • Ulrich
    Indigo Rose Staff Member
    • Apr 2005
    • 5130

    #2
    Already discussed here...

    Comment

    • brohan
      Forum Member
      • Jun 2008
      • 9

      #3
      Thanks, it helped quite a bit. I searched the help files and can't find out how to nest commands. Here is what I changed my script to, however, I need help with getting the text file into the email body:

      TextFile.WriteFromString("C:\\Survey.txt", "You must answer the following questions to receive your FREE Starbucks card:\r\n\r\nName:\r\n\r\nRealtor Name(first and last):\r\n\r\nWhat I enjoyed about the home:\r\n\r\nWhat I thought about the price:\r\n\r\nWhat could be done to improve the home:\r\n\r\nWhat I thought about the price:\r\n\r\nAm I interested in purchasing the home:\r\n\r\nMailing Address(for Starbucks card only!):\r\n\r\n\r\nThank you for taking the time to answer the above questions\r\n\r\n(One card per household per home visited)", false);
      File.OpenEmail("[email protected]&Subject=Free $5 Starbucks Card for 7714 NE 104th&Body={textfile.readtostring(C:\\Survey.txt)}", SW_SHOWNORMAL);

      Comment

      • Dermot
        Indigo Rose Customer
        • Apr 2004
        • 1791

        #4
        You don't need to write it to a text file and then read it back again. Just assign the body text to a variable and then include the variable it the email command.

        Code:
        local body = "You must answer the following questions to receive your FREE Starbucks card:\r\n\r\nName:\r\n\r\nRealtor Name(first and last):\r\n\r\nWhat I enjoyed about the home:\r\n\r\nWhat I thought about the price:\r\n\r\nWhat could be done to improve the home:\r\n\r\nWhat I thought about the price:\r\n\r\nAm I interested in purchasing the home:\r\n\r\nMailing Address(for Starbucks card only!):\r\n\r\n\r\nThank you for taking the time to answer the above questions\r\n\r\n(One card per household per home visited)"
        
        File.OpenEmail("[email protected]&Subject=Free $5 Starbucks Card for 7714 NE 104th&Body={"..body.."}", SW_SHOWNORMAL);
        Dermot

        I am so out of here :yes

        Comment

        • brohan
          Forum Member
          • Jun 2008
          • 9

          #5
          I cut and pasted the script exactly as you had written it. It went into the body of the email, however the new line characters showed up in the body rather than creating new lines. What punctuation should I use to have line breaks? BTW I am trying to get this to work in Outlook, if that makes a difference.

          Thanks for all of the help from both of you!

          Comment

          • brohan
            Forum Member
            • Jun 2008
            • 9

            #6
            I got it! I replaced \r\n with %0D%0A and it worked just find.

            Comment

            • RizlaUK
              Indigo Rose Customer
              • May 2006
              • 5552

              #7
              I got it! I replaced \r\n with %0D%0A and it worked just find.
              thats handy to know, if i ever use outlook from AMS i'll bear this in mind, good catch :yes
              Embrace change in your life, you never know, it could all work out for the best

              Comment

              Working...
              X