View Full Version : Basic Question: Adding Lines to Email Body
brohan
06-28-2008, 04:54 PM
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):Date of Showing:What did you think of the price?What did you like most about the home?[B]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
06-28-2008, 07:22 PM
Already discussed here (http://www.indigorose.com/forums/showthread.php?t=22489)...
brohan
06-28-2008, 08:29 PM
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);
Dermot
06-28-2008, 10:39 PM
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.
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);
brohan
06-28-2008, 10:45 PM
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!
brohan
06-28-2008, 11:11 PM
I got it! I replaced \r\n with %0D%0A and it worked just find.
RizlaUK
07-03-2008, 08:13 PM
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
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.