October 6, 200817 yr I want to use the Emailbody Substitute multiple times on the same block of text but for different search strings. For example the fist section of text is Dear 1 2 I would want to replace 1 with the field Title and 2 with the field last name. When I do this it only does the second one. This is the calculation I used: EmailBodySubstitute( "1" ; Customers::Title) and EmailBodySubstitute( "2" ; Customers::Last_Name) Is there a way to fix this? NB. I have tried putting all of the text together in a field in the database first and simply doing the replace with all of the text but this does not take any line breaks.
October 6, 200817 yr Format the substitutions as follows: Let( [ text = emailtext ; sub1 = substitute( text ; "1" ; CUstomers::Title) ; sub2 = substitute( sub1 ; "2" ; CUstomers::Last_Name) ; sub3 = substitute( sub2 ; "3" ; CUstomers::First_Name) ]; sub3 )
October 6, 200817 yr Author Hi there Thank you for the reply but I am not very experienced with this plug in and am not sure how to use the code you have provided. I should have given you the full code I am using this is: EmailCreate( "[email protected]" ; Customers::Email_Business ; "Welcome to Exel gaming read this and how you view life could change forever!" ) and EmailSetBodyFile( "http://exelgaming.accountsupport.com/mail/M1mail.html" ; False ) and EmailBodySubstitute( "1" ; Customers::Title ) and EmailBodySubstitute( "2" ; Customers::Last_Name ) and EmailSend The bulk of the Email text is on the webpage. I hope this makes sense. John
October 24, 200817 yr EmailCreate( "[email protected]" ; Customers::Email_Business ; "Welcome to Exel gaming read this and how you view life could change forever!" ) and EmailSetBodyFile( "http://exelgaming.accountsupport.com/mail/M1mail.html" ; False ) and EmailBodySubstitute( "1" ; Customers::Title ) and EmailBodySubstitute( "2" ; Customers::Last_Name ) and EmailSend In the EmailBodySubstitute function, the first argument must be a string which appears in the original message body somewhere. So you can do something like this: EmailCreate( "[email protected]" ; Customers::Email_Business ; "Dear $TITLE$ $LASTNAME$, Welcome to Exel gaming read this and how you view life could change forever!" ) and EmailSetBodyFile( "http://exelgaming.accountsupport.com/mail/M1mail.html" ; False ) and EmailBodySubstitute( "$TITLE$" ; Customers::Title ) and EmailBodySubstitute( "$LASTNAME$" ; Customers::Last_Name ) and EmailSend
Create an account or sign in to comment