Darren Burgess

return html from EmailSetBodyFile

3 posts in this topic

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

  • Similar Content

    • By john777
      Am trying to clean up the email field on a filemaker database.  At the moment there are many records that contain more than one email address or an email address and text.
      what I want to do is delete everything in the field apart from the first email address
      In the vast majority of cases the required email address is the first thing in the field.  So my thinking is that the script would have to read along until it found an "@" symbol and then truncate the text at the next space comma or backward or forward slash as they are generally the methods people have used to separate the email addresses.
      Apart from that am struggling - I would be delighted if someone could give me some pointers on this
    • By menno
      When updating any 360works-plug-in it is deactivated after any update. Sometimes it does not even is replaced.
      I have created batch-scripts to shut off FileMaker and then remove any 360works-plug-in.
      After that my user(s) have to restart the application again and the new version of (any) 360works plug-in is installed correctly and activated automatically.
      I also use other plug-ins by Troi, Dacons en Goya simultaniously and these work perfectly fine and also will be updated and activated when a newer version is being installed. Only the 360works-plug-ins fail to update everytime.
      I use the script-step "Install plug-in file" so nothing exotic is done there.
      The problems occur on windows 7, 8, 8.1, 10, 2008 and 2012. On the 32 and 64 bits versions (2012 - 64-bit only)
      Any suggestions or anyone else has the same trouble?
    • By Oyseka
      Hi all, I know this should be easy but I am not getting it right.

      The mail gets sent but no attachment
    • By MiSc
      I am receiving the following error when attempting to load 360Works_Email plug-in.
      "?" filed to initialize.
      I have installed JAVA for OS X from:
      Re-downloaded the plug-in from and re-installed it:
      Restarted FMPro15 Advanced - and receive the same error: "?" filed to initialize. 
      This is also happening to the ScriptMaster Plug-In.
      Grateful for any tips.
    • By liamob1
      Does anybody know a way of directly attaching a file to gmail (via the webclient) using mail to or via the send email functions. We have multiple users that move around the building so setting up outlook for each user is becoming a nightmare. They use iPads so the send mail script function works here, but on a desktop we would like it to force open GMail or use Mailto: and take the attachment with it. I've tried everything i know about mailto and i'm at a dead end. 
      I did think about trying to integrate google drive HOWEVER i have no experience with Googles API's.