Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2008
    Posts
    9

    Basic Question: Adding Lines to Email Body

    File.OpenEmail("Brian@BrianRohan.com&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!

  2. #2
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    Already discussed here...

  3. #3
    Join Date
    Jun 2008
    Posts
    9
    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("Brian@BrianRohan.com&Subject=Free $5 Starbucks Card for 7714 NE 104th&Body={textfile.readtostring(C:\\Survey.txt)}", SW_SHOWNORMAL);

  4. #4
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    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("Brian@BrianRohan.com&Subject=Free $5 Starbucks Card for 7714 NE 104th&Body={"..body.."}", SW_SHOWNORMAL);
    Dermot

    I am so out of here

  5. #5
    Join Date
    Jun 2008
    Posts
    9
    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!

  6. #6
    Join Date
    Jun 2008
    Posts
    9
    I got it! I replaced \r\n with %0D%0A and it worked just find.

  7. #7
    Join Date
    May 2006
    Posts
    5,380
    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
    Open your eyes to Narcissism, Don't let her destroy your life!!

Similar Threads

  1. Sending Email with Subject, Body and Attachment Filled In
    By Adam in forum AutoPlay Media Studio 7.5 FAQ
    Replies: 0
    Last Post: 12-14-2007, 01:31 PM
  2. open email using multiple body lines
    By chad in forum Setup Factory 7.0
    Replies: 16
    Last Post: 01-11-2005, 08:23 AM
  3. Adding an Email Link
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 10-03-2003, 03:36 PM
  4. Sending Email with Subject, Body and Attachment Filled In
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-24-2003, 01:30 PM
  5. inserting a Document as the body of an email
    By maxie in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 09-10-2003, 07:29 PM

Posting Permissions

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