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.

Send HTML Email through Outlook

Featured Replies

Requirements:

ScriptMaster for FMP (AWESOME!)

Install Groovy and Reboot (yes you have to reboot, the ActiveXProxy won't work without it)

(During setup ActiveXProxy is an option, make sure it installs with Groovy.)

Recommended:

Install Advanced Security for Outlook

Should be in a startup script: (if this runs more than once, it stops working!)


SMLoadJar ( "file://C:/Program Files/Groovy/lib/scriptom-1.2.jar" ) & 

SMLoadJar ( "file://C:/Program Files/Groovy/lib/jacob.jar" )





Setup the variables for the message:



/* you can use multiple addresses seperated by ';' */

SMSetVariable ( "eTO" ; "[email protected]" ) & 

SMSetVariable ( "eSUBJ" ; "The thing" ) & 

SMSetVariable ( "eBODY" ; "You know, the thing." )







EvaluateGroovy ( "

	import org.codehaus.groovy.scriptom.ActiveXProxy;

	

	// Create the Outlook Object

	def oOutlook = new ActiveXProxy("Outlook.Application");

	

	//Create the MAPI namespace object and logon

	def oNS = oOutlook.GetNamespace("MAPI");

	oNS.Logon "Outlook";

	

	//Create the Email Item

	def oEmail = oOutlook.CreateItem(0);

	

	//Apply the Properties	

	oEmail.Recipients.Add eTO;

	oEmail.Recipients.ResolveAll

	oEmail.Subject = eSUBJ;

	oEmail.HTMLBody = eBODY;

	

	//Display the Email

	oEmail.Display "";

" )

Edited by Guest

Wow, that is cool ;)-)

As soon as I get a chance to test this (I'm on a Mac, so I'll need to get a virtual Windows setup) I'll add it to the ScriptMaster examples file.

  • 1 month later...

Will it bypass the security outlook warning by using ScriptMaster and Groovy? Or should I install the plugin that you recommended?

Thanks

You can also download "ClickYes" to bypass the dialog.

Hello Alex,

Thank for your information. "Download Click Yes"? What do you mean by that? I am sorry that I got lost. However, I found one of member writing VB Script to bypass the security outlook warning directly (the program that I want to make is full automation without any kind of user interface).

I am wondering if you know how to get the filename on a folder by their creation date. For example, today, I would create 10 filenames. I want VB Script to throw their filepath names (the 10 filenames) to Filemaker to process them to database. Tomorrow, I would have 5 filenames, then I would read only the 5 rest filenames and not the 15 filenames (10 filenames plus 5 filenames). Is that possible?

Thank you.

http://www.contextmagic.com/express-clickyes/

Thank you for the plugin. Well, do you know the idea to solve my question?

  • Author

Thank you for the plugin. Well, do you know the idea to solve my question?

Recommended:

Install Advanced Security for Outlook

Click the link and read what it will do for you regarding Outlook Security.

Hello James,

Sorry for the misunderstanding. I am asking about this message below... (from my previous question)

I am wondering if you know how to get the filename on a folder by their creation date. For example, today, I would create 10 filenames. I want VB Script to throw their filepath names (the 10 filenames) to Filemaker to process them to database. Tomorrow, I would have 5 filenames, then I would read only the 5 rest filenames and not the 15 filenames (10 filenames plus 5 filenames). Is that possible?

About bypassing the security warning outlook, Alex (Genx) mentioned to download Click Yes and actually I found out one member, if not mistaken aholtzapfel, that wrote VB Script that can bypass the security warning.

Happy holidays...

  • Author

That would be a groovy script. And Scriptmaster will run them... Sometimes you have to modify them, but you should be able to do that. Go to the Groovy website and look over the tutorials.

Thanks for your guide, James. Currently, I am looking Auto It program to do that. Still in learning mode...

  • Author

I do alot of AutoIT programming. I love it! But it doesn't integrate with Filemaker easily.

You can use the ActiveXProxy in groovy with Scriptmaster to access the AutoITX object but it seems a bit silly to me, since groovy will do so much.

Hello again James,

So, what is the best functions or ideas that you can used from using AutoIt over Groovy?

It seems that you like to use Groovy for FileMaker compare using AutoIt, right?

  • Author

My point is that I can use AutoITX with Filemaker, but I would have to use Scriptmaster and Groovy's ActiveXProxy to do it. If I can accomplish my objective in Scriptmaster/Groovy (no ActiveXProxy and AutoITX) without the extra step, I'm going to do that. It is also important to note that AutoITX doesn't fully implement AutoIT.

I suppose that one could use Scriptmaster to call an AutoIT executable that would pass back a result through the errorlevel environment variable. I imagine that Groovy is capable of interacting with environment variables.

Hello James,

Thank you for your respond and information. I will do some reading about it.

Happy holidays!

You might want to take a look at the Scodigo PHP plugin - then you can send whatever email you want without even needing outlook... not to mention do lots of other cool stuff.

Thanks Alex. About the email stuff, I solved it already though. The question that I asked to James is another issue.

Anyway, thank you for your comment.

Happy holidays!

  • Author

You might want to take a look at the Scodigo PHP plugin - then you can send whatever email you want without even needing outlook... not to mention do lots of other cool stuff.

Solutions like that have merit. I wanted an Outlook solution because in my small office, we use Outlook/IMAP to track all our email. To my dismay, all our email correspondence is HTML. So, emails based on FMP information have involved Word mail merge and CSV export files. This gets pretty ridiculous when you start adding attachments, as I have found no way to do this from Word mail merge. Unlike a PHP or server-based solution (if I am not mistaken,) a solution like this one allows FMP to send HTML email through Outlook. Tracking remains in the email client where our office manages the all of the email.

I could have used this on a project about a year ago, it would have saved me a good bit of time.

Well, with FM 9 anyway, you can render HTML directly from a field in a web viewer - and with PHP you can send HTML... though it wouldn't go through the email client.

  • Newbies

Hi. I am setting up an XP machine for FM Pro.

The FM guy has asked me to setup SMTP for FM to be able to send notifications to the administrator in the even of a problem. Can this be done through the default outlook client or can I set up SMTP by itself? Thanks for all help.

Can this be done through the default outlook client or can I set up SMTP by itself? Thanks for all help.

With the PHP solution and / or scodigo plugin you could send through SMTP, with FM by its lonesome, it will use the default mail client on your PC.

  • 9 months later...
  • Newbies

Jamie,

Coming from a Java web application background, I miss having a testing framework.

I looked into AutoIt and I agree it's poor integrating with Filemaker. So I'm curious how you use groovy to perform tests? I am familiar with Scriptmaster. Being a Groovy newbie, I'm having a mental block envisioning how Groovy can accomplish the same things as AutoIt.

If you could provide an example that would be great!

Thanks!

ScriptMaster includes modules for sending e-mail directly through an SMTP server, without using your desktop client.

  • 8 months later...
  • Newbies

Hi there, filemaker beginner here, i'm developing a solution for a family business, and have produced a new contact management and enquiries solution. I had it all setup but then my employer has requested being able to send html emails via outlook, immediately i paniced until i stumbled across this post via google. It seems like this is exactly what i am looking for.

However i have downloaded scriptmaster and groovy, and managed to find the correct .jar files

SMLoadJar ( "file://C:/Program Files/Groovy/lib/scriptom-1.2.jar" ) &

SMLoadJar ( "file://C:/Program Files/Groovy/lib/jacob.jar"

(this was neccesary as they weren't included in the latest release of groovy. However when running the script i get the following error in the groovy console:

unexpected token: import at line: 10, column: 5

as far as i can tell this is pointing to:

import org.codehaus.groovy.scriptom.ActiveXProxy;

i did some research and it does appear that it has been renamed since this post to activexobject, however this shouldn't be an issue due to using the older .jar files, any help with this matter would be greatly appreciated.

The final solution is that i want a button to press which opens a new message in outlook express, and allows html, as the signature on the emails requires it.

Regards Alex

  • 1 month later...
  • Author

I am soooooooo sorry for the delay. I have been somewhat busy. Anyway, I tried the method with the latest version of scriptmaster and I am getting a similar error.

To that end, I recommend that you modify an email script that comes in the SM examples db or purchase the email plugin that 360 offers. If you need to keep copies in a local client, simply BCC the email to the appropriate account.

Sorry that I am not more help than this. :

  • 1 year later...

Scuse late posting, but really peeps shouldn't think Filemaker on a Mac doesn't have HTML email capacity, we've been enjoying it (with help of Applescript & XMail) since 2005ish.

http://fmforums.com/forum/showtopic.php?tid/217843/

possible on Mac OS X for free, utilizes XMail osax. Very effective. Been using for years, but only now bothered to start contributing to community, and indirectly i'm hoping some of you will donate to JB LeStang, to encourage freeware/donationware developers.

V reliable... + automatable attachments etc.

I hope my demo is clear enough to follow!

  • 3 years later...

When I try and "OK" the specift calculation dialog box for this step:

 

EvaluateGroovy ( "
    import org.codehaus.groovy.scriptom.ActiveXProxy;
    
    // Create the Outlook Object
    def oOutlook = new ActiveXProxy("
Outlook.Application");
    
    //Create the MAPI namespace object and logon
    def oNS = oOutlook.GetNamespace("
MAPI");
    oNS.Logon "
Outlook";
    
    //Create the Email Item
    def oEmail = oOutlook.CreateItem(0);
    
    //Apply the Properties    
    oEmail.Recipients.Add eTO;
    oEmail.Recipients.ResolveAll
    oEmail.Subject = eSUBJ;
    oEmail.HTMLBody = eBODY;
    
    //Display the Email
    oEmail.Display "";
"
)

 

I get an error message saying "The specified table cannot be found" for "Outlook.Application"

 

 

Please help!

  • 1 year later...
  • Newbies

Hello,

the thread might be very old and obsolete for the last contributor now, I'm nevertheless posting the solution that solved the strange problems for me.

  1. use ActiveXObject instead of ActiveXProxy in the current version of scriptom (1.6) - I don't know when the change was carried out. 
  2. Before running the function, you must add two jars to ScriptMaster in a startup script, e.g.
  3. Set Variable $result ; Value:SMLoadJar ( "file://C:/Program Files/Groovy/lib/scriptom-1.6.0.jar" ) & SMLoadJar ( "file://C:/Program Files/Groovy/lib/jacob.1.2.jar" )
    where "C:/Program Files/Groovy/lib/" is the path to the Groovy or load the jar files from a comtainer field from a filemaker table (See 
  4. Assure that the jar files are loaded only once, eg. by checking SMGetLoadedJars for the jar names before loading.

 

Regards

Xanius

Create an account or sign in to comment

Important Information

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

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.