Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

EmailAttachFileInline

Featured Replies

Can someone explain the parameters for this function. I can't get it to work.

Emails with inline graphics use HTML to write the email, the same way web pages do. One important difference is that with a webpage you can specify a URL to a location on the web server to locate an image. With an email, this doesn't work!

The way emails get around this is buy using content IDs, which are references to images which have been sent with the email. To insert an image in-line in an email you reference an attached file's content ID instead of using a URL like you would in a normal webpage's HTML.

A content ID can be anything you want. It's just a name, and you specify it when calling the EmailAttachFileInline function.

In a set variable step you will call EmailAttachFileInline with your data source and content ID.

EmailAttachFileInline (MyTable::MyContianer ; "myContentID")




Then in the HTML of your email you can reference the content IT as the source for your image using a regular HTML image tag.




<img src="cid:myContentID">




If you are hard-coding your html into your calculation you will need to escape the quote characters, but if it's in a file or you enter it into a text field you won't need to worry about doing that.



The documentation.html file which comes with the download of this plugin has an example of this in the description for the EmailAttachFileInline function description.




EmailCreate("[email protected]"; "[email protected]"; "My Newsletter") and

EmailSetBody(

    "<html><body><img src=\"cid:headergif123\">" &

    "



This is an HTML message with embedded images

" &

    "<img src=\"cid:footergif456\">" &

    "</body></html>";

    "html"

) and

EmailAttachFileInline( Globals::headerContainer ; "headergif123" ) and

EmailAttachFileInline( Globals::footerContainer ; "footergif456" ) and

EmailSend

It's a good idea to call each of the Email functions in their own setVariable script step so that error checking is easier to do.

  • Author

Emails with inline graphics use HTML to write the email, the same way web pages do. One important difference is that with a webpage you can specify a URL to a location on the web server to locate an image. With an email, this doesn't work!

The way emails get around this is buy using content IDs, which are references to images which have been sent with the email. To insert an image in-line in an email you reference an attached file's content ID instead of using a URL like you would in a normal webpage's HTML.

A content ID can be anything you want. It's just a name, and you specify it when calling the EmailAttachFileInline function.

In a set variable step you will call EmailAttachFileInline with your data source and content ID.

EmailAttachFileInline (MyTable::MyContianer ; "myContentID")




Then in the HTML of your email you can reference the content IT as the source for your image using a regular HTML image tag.




<img src="cid:myContentID">




If you are hard-coding your html into your calculation you will need to escape the quote characters, but if it's in a file or you enter it into a text field you won't need to worry about doing that.



The documentation.html file which comes with the download of this plugin has an example of this in the description for the EmailAttachFileInline function description.




EmailCreate("[email protected]"; "[email protected]"; "My Newsletter") and

EmailSetBody(

    "<html><body><img src=\"cid:headergif123\">" &

    "



This is an HTML message with embedded images

" &

    "<img src=\"cid:footergif456\">" &

    "</body></html>";

    "html"

) and

EmailAttachFileInline( Globals::headerContainer ; "headergif123" ) and

EmailAttachFileInline( Globals::footerContainer ; "footergif456" ) and

EmailSend

It's a good idea to call each of the Email functions in their own setVariable script step so that error checking is easier to do.

Ok. I am still not getting it.

This is what I have.

I have a container field in a database containing the graphic file I want at the email.

The name of the file is "aic.jpg".

I want the graphic as a footer for the email.

How do I do this?

Ok. I am still not getting it.

This is what I have.

I have a container field in a database containing the graphic file I want at the email.

The name of the file is "aic.jpg".

I want the graphic as a footer for the email.

How do I do this?

Call EmailAttachFileInline( Table::myContainer ; "myContentID" ) in a set variable step

and in the body of your HTML write <img src="cid:myContentID"> as you would use a regular image tag in HTML.

  • Author

Thank you for trying to help.

If you need a hand with this feel free to give me a call or email me with what you are trying to do. 360Works can do the development work for you. Let me know what you're looking for and I'll give you an estimate or a quote for the work.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.