Jump to content
Darren Burgess

return html from EmailSetBodyFile

Recommended Posts

Is it possible to get as a return value the HTML code derived from the EmailSetBodyFile function? for example, given the following code, I would like to get the resulting html back. I guess I could extract the html from the file and do the substitutions in using filemaker script steps, however i am wondering if it is possible to do with plugin functions.

EmailSetBodyFile( $_body_html_file ; 1 ) and
EmailBodySubstitute( $_preamble_replace_string ; $_body_html ) 
EmailBodySubstitute( $_signature_replace_string ; $_signature_html )


Share this post

Link to post
Share on other sites

Hi Darren,

There is not a function in the Email plugin that will output the HTML after the substitutions. Your approach is probably the best way to accomplish this. The only way I can think of to do this with solely the Email plugin would be to send the email to yourself ( or any other inbox you can access) first and then do a read on the inbox, pull the email in and parse the html out of it using EmailReadMessageValue("html"). 

Share this post

Link to post
Share on other sites

You probably don't have to actually send the e-mail, try just saving it as a draft and then read the drafts folder.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

By using this site, you agree to our Terms of Use.