Page 1 of 1

formatting an email

Posted: Tue Oct 14, 2008 11:25 pm
by Glenn Boyce
I'm trying to set up an email order confirmation and I want to put various bits of text on different lines. I can get the email bit to work and I thought Linefeed would allow me to place what I wanted on each line. Code attached and suggestions welcome

Code: Select all

on mouseUp
  revmail fld "Memail",, "Confirmation of Order", "Dear " & fld "Mcontact" & ","  
  linefeed
  "Thank you for your order No" && fld "CustOrderNo" & " which has now been processed." 
  linefeed
  "Expected delivery is " & fld "dateReqd" 
end mouseUp

Posted: Tue Oct 14, 2008 11:51 pm
by SparkOut
The message body is just one string, so you are passing it only the first line.

Try adding "&" before and after the linefeeds to concatenate the string.
Or build up the message text in a variable and just pass that one variable to the revMail command.

Code: Select all

on mouseUp
  local tMsgBody
  put "Dear" && fld "Mcontact" & "," & lf into tMsgBody
  put  "Thank you for your order No" && fld "CustOrderNo" && "which has now been processed." & lf after tMsgBody
  put "Expected delivery is" && fld "dateReqd" & lf after tMsgBody
  revmail fld "Memail",, "Confirmation of Order", tMsgBody
end mouseUp

Posted: Tue Oct 14, 2008 11:55 pm
by Glenn Boyce
man that was quick!! I'll give both a try

Thanks

Posted: Tue Oct 14, 2008 11:58 pm
by SparkOut
And you were quick too! I added a code snippet but you'd already replied.
Good luck anyway.