Filemaker random crash when sending email

Hi experts. We're experiencing an intermittent issue with Filemaker.

We have FM server 11 and Filemaker 11 on our clients (5 clients)

I have written a script that sends an email (using Outlook), but the script occasionally causes FM to crash. This happens once "Send" is pushed in Outlook. It happens in FM 11 and 10 and Outlook 2010 and 2013. Here is the script:

Insert Calculated Result [Select; Mail::Sent On; Get ( CurrentDate ) &““ & Get ( CurrentTime)]
Commit Records/Requests [No dialog]
Set Field [Global Fields::G_SupportEmailTo; Mail::To]
Set Field [Global Fields::G_SupportEmailDate; Mail::cSent On Date]
Set Field [Global Fields::G_SupportEmailTime; Mail::cSent On Time]
If[IsEmpty ( Mail::To )]
Show Custom Dialog [“Send Support Email”; “There is no email address for this contact, so the email will be created to support@***.com...”]
Send Mail [Send via E-mail Client; To: “support@***”; CC: Mail::Cc; BCC: Mail::Bcc; Subject: Mail::Subject; Message: Mail::Body]
Insert Calculated Result [Select; Mail::Sent On; Get ( CurrentDate ) & “: “ & Get ( CurrentTime )]
Close Window [Current Window]
Adjust Window [Maximize]
Exit Script []
End If
Show Custom Dialog [“Send Job-related Email”; “An email will be sent to “& Mail::To & “ regarding this job. Make sure you change the FROM address...”]
Send Mail [Send via E-mail Client; To: Mail::To; CC: Mail::Cc; BCC: Mail::Bcc; Subject: Mail::Subject; Message: Mail::Body]
// If [Get(LastError)]
// Show Custom Dialog [“Message”; ‘There was an error addressing the email. Please check that your email software is installed correc.,.”]
// End If
Close Window [Current Window]
Adjust Window [Maximize]
Insert Calculated Result [Support: :Support Response; ¶ & ¶ & Global Fields::G_SupportEmailDate & “, “ & Global Fields: :G_SupportEmailTime & “ - “& Get(AccountName) &“ (Remote)”& l & “- Sent email to “ & ...
Exit Script []

(I've just starred out the email address in case bots come looking).

As I said, the issue occurs when we click "Send" in Outlook. Normally, the "send email" window in FM should close and data should be added to the Support::Support Response field.

However, when this issue occurs, the window does not close and an hourglass appears indefinitely in FM. If we click anywhere in FM, we get a Window saying: "This action cannot be completed because the other program is busy..."We can click "Switch To" or "Retry", but both crash FM.

When FM crashes, We get this in the event logs:

Log Name:      Application
Source:        Application Error
Date:          11/06/2013 4:49:15 PM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      PC01231
Faulting application name: FileMaker Pro Advanced.exe, version:, time stamp: 0x4c12006f
Faulting module name: FMOLE.dll, version:, time stamp: 0x4c11f959
Exception code: 0xc0000409
Fault offset: 0x0000c76d
Faulting process id: 0x11f8
Faulting application start time: 0x01ce66497b1c9189
Faulting application path: C:\Program Files (x86)\FileMaker\FileMaker Pro 11 Advanced\FileMaker Pro Advanced.exe
Faulting module path: C:\Program Files (x86)\FileMaker\FileMaker Pro 11 Advanced\FMOLE.dll
Report Id: 0745b525-d263-11e2-be8b-5453ed1e15f8
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="">
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <TimeCreated SystemTime="2013-06-11T06:49:15.000000000Z" />
    <Security />
    <Data>FileMaker Pro Advanced.exe</Data>
    <Data>C:\Program Files (x86)\FileMaker\FileMaker Pro 11 Advanced\FileMaker Pro Advanced.exe</Data>
    <Data>C:\Program Files (x86)\FileMaker\FileMaker Pro 11 Advanced\FMOLE.dll</Data>

So basically, it looks like FMOLE.dll is crashing. But because this is so intermittent, it's difficult to troubleshoot. It might happen 1 time out of 10 or 20 for one person, and every second time for another. Some users seem to have the issue more than others.

Does anyone have any idea what might be causing this to happen?

Any advice or assistance would be appreciated.
Who is Participating?
Will LovingConnect With a Mentor PresidentCommented:
You are correct about the FM Pro's capabilities regarding HTML emails, whether send  using the local client or SMTP.

As a developer, I've use the SMTPit Pro plugin for several years. It provides far more flexibility than the built-in options in FM, including HTML emails, multiple attachments, the ability to send Container field contents, etc.
Will LovingPresidentCommented:
Although the forum post below refers to FMP 9, it might be helpful.

I'm not familiar with this issue but as an alternative you might consider trying using SMTP within FileMaker instead, which avoids the interaction with Outlook entirely. You can set it to BCC yourself if you want a copy of the email.

A small note on your script: I suggest you use the Set Field( ) script step instead of Insert Calculated Result( ). Set Field() can do exactly what Insert Calculated Result does, but removes the requirement to have the cursor in the field or even have the field on the layout. You simply have to be on a layout (including a blank one) based on the table you are trying to set the field value in (or that is related to the that table).

Also, you can use Get( CurrentTimeStamp ) or Get( CurrentHostTimeStamp ) to capture both the date and time together rather than concatenating the fields.
lukerussellAuthor Commented:
Thanks for the reply. I'd actually prefer to use the SMTP function, but we need our signatures in the email - which include a logo (thus the email needs to be HTML). As far as I can see, the smtp function in FM can only to text email. Is this right?
Free tool for managing users' photos in Office 365

Easily upload multiple users’ photos to Office 365. Manage them with an intuitive GUI and use handy built-in cropping and resizing options. Link photos with users based on Azure AD attributes. Free tool!

lukerussellAuthor Commented:
Hmmm. I wonder if this suggestion in your link will work:

My workaround of this problem is:
- create a new button
- use the function Openurl
- write this instruction:

"mailto:"&"test sending mail " & fieldname & "%0A this text is write on a new line..."
lukerussellAuthor Commented:
That looks good! I'll have a look at SMTPit Pro. Might solve a few other issues too...
lukerussellAuthor Commented:
SMTPit Pro looks like it will do the trick. Thanks willmcn.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.