Jump to content

Inline Attachments with EmailSetBody (GetAsCss)


Ron L
 Share

This topic is 2778 days old. Please don't post here. Open a new topic instead.

Recommended Posts

is it possible to combine EmailSetBody (GetAsCss) with inserting inline attachments via EmailSetBody ( content ; html) ?

 

I am trying out Email2 with FMPAdv 13 on a PC.  

 

I have been able to use EmailSetBody (GetAsCss) successfully to take a formatted text field and use it as the body of an html email message.  Font-family, size, text color, text style come accross perfectly.  Even highlighting comes through.

 

I have been able to use EmailSetBody to create an html message with inline graphics, but I have to hard code the html code for the message.  I've been able to do this with fixed text and with variable elements inserted.  The result looks great.

 

What I have not been able to figure out is how to combine those functions.  I want to have a banner image at the top of the message body, followed by the text contained in a FileMaker field, with html formatting.  Is it possible?  

 

 

Link to comment
Share on other sites

This is a problem with FileMaker since forever - sending nicely formated emails from the system. There are a few plugins that could help a bit and the "GetAsCss" script that you are already using. However, none of these fully resolves the issue, you will have to use some kind of a workaround - either render text in some html editor and paste it as a body text or create a number of script steps that would facilitate the hard coding procedure.

Also, the text format will not be preserved if you paste it into FileMaker field on PCs, so all in all, covering this issue fully and successfully would require some new fantastic plugin or some new version of FileMaker.

I would also love if there was a way to offer this kind of email editing feature to the users.

Link to comment
Share on other sites

Thanks for your comments milanm.

 

I spent a lot of time working with the the 360Works plug-in last week and I think I'm getting the most out of it.  I was just hoping someone would tell me I missed something.  This plugin goes a long way toward taking care of FMP's shortcomings, but not quite all the way.  Thanks again....

Link to comment
Share on other sites

As has been discussed, sending emails with FileMaker text field formatting requires the use of GetAsCSS on the field, while adding inline images generally requires hardcoding of HTML. It is possible to have a script use GetAsCSS on a field then edit that resulting HTML to include the references to the inline attachments, but I don't think there's any solution more elegant than that.

 

Please let me know if you have any questions!

Link to comment
Share on other sites

  • 4 months later...

How would you reference the files? Say a container in FM or on my desktop (which would not work for every user).

It is possible to have a script use GetAsCSS on a field then edit that resulting HTML to include the references to the inline attachments, but I don't think there's any solution more elegant than that.

 

Please let me know if you have any questions!

​In that situation how would you reference the file? It's a small version of our logo that is in a FM container, and I have the png file also. I just want to add it at the end of the email.

Link to comment
Share on other sites

Hi RPaulH,

What you can do is run the GetAsCSS function then append an <img> tag to the the resulting html and add a Content Id for the image. Then you can append EmailAttachFileInline(ExampleImages::ExampleLogo) to the EmailSetBody Function . Check out this page of our documentation for a little more information.

Link to comment
Share on other sites

This topic is 2778 days old. Please don't post here. Open a new topic instead.

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
 Share

×
×
  • Create New...

Important Information

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