11 Replies Latest reply on Aug 20, 2015 10:35 AM by ibrahim_bittar

    Send Mail with Outlook 2011 for Mac

    davidjhayden

      Since Microsoft dropped Entourage for Outlook, a number of my Mac OSX clients have switched from Apple Mail. A number of our solutions contain scripts to create emails using the Send Mail script step, with the idea that the user will modify the auto-generated email prior to clicking Send in their mail app. They're getting an error message when they run the script if Outlook is set up as the default mail app.

       

      Is Outlook 2011 for Mac not supported? It seems strange that Mail would be the only currently shipping Mac mail client that works -- particularly since FMP 12 is a recent release....

       

      Dave Hayden

        • 1. Re: Send Mail with Outlook 2011 for Mac
          taylorsharpe

          FileMaker supports the Send Mail function and not any specific mail client.  In other words, FileMaker sends the "Send Mail" function to the Operating System and not any specific mail application.  The OS then decides what is the default mail app.  When you have converted users from Apple Mail to Outlook, the Send Mail may have not been properly configured or converted to point to Outlook as the new default mail app. Out of curiosity, is this SMTP or Exchange Mail that you are using to send mail?

          • 2. Re: Send Mail with Outlook 2011 for Mac
            taylorsharpe

            One other thing, if you go to a web page that has an email in it, if you click on it, does it fail to load in Outlook also?  If so, that would confirm this is an OS level issue or Outlook problem, but is not a FileMaker issue. 

            • 3. Re: Send Mail with Outlook 2011 for Mac
              davidjhayden

              Hi Taylor:

               

              Outlook is selected as the default email client, and clicking on a web link DOES create a new email in Outlook.  If I switch the client to Mail it works as expected.

              • 4. Re: Send Mail with Outlook 2011 for Mac
                taylorsharpe

                Good confirmation, Dave.  That truly indicates there is a FileMaker issue.  Unless anyone else has ideas, it sounds like you need to file a possible bug report with FileMaker.  Is anyone else able to duplicate this issue?

                • 5. Re: Send Mail with Outlook 2011 for Mac
                  timcimbura

                  In my experience, the FileMaker Send Mail command works inconsistently with Microsoft Outlook 2011. (I do believe it is buggy...not sure if it is Microsoft or FileMaker's fault though.) I was having enough problems that I wrote an alternate AppleScript to send the mail.

                   

                  I set a variable $$theAppleScript to the following...(You'll need to modify this to work in your situation.)

                   

                  "tell application \"Microsoft Outlook.app\"¶" &

                  " set theMsg to make new outgoing message with properties {subject:" & If($$emailSubject<>""; "\"" & $$emailSubject & "\"" ; "\"Subject\"") &

                  ",content:" & If($$emailMessage<>""; "\"" & Substitute($$emailMessage;"¶";"<br>¶") & "\"" ; "\"Message\"") & "}" & "¶" &

                   

                   

                    " make new to recipient at theMsg with properties {email address:{address:\"" & $$emailSendTo & "\"}}" & "¶" &

                  If($$emailSendBCC<>"";  " make new to bcc recipient at theMsg with properties {email address:{address:\"" & $$emailSendBCC & "\"}}" & "¶" ; "") &

                  If($$emailSendCC<>"";    " make new to cc recipient at theMsg with properties {email address:{address:\"" & $$emailSendCC & "\"}}" & "¶"; "") &

                    "open theMsg" & "¶" &

                  "end tell"

                   

                  Then I use the Perform Applescript command with the variable $$theAppleScript set.

                  Works OK for me...though it needs a little work to get an attachment working correctly that I haven't had a chance to fix yet.

                   

                  Tim Cimbura

                   

                  Helping businesses become more effective, productive, and profitable through custom iPad/iPhone applications, FileMaker app solutions, and web site design.

                   

                  tim@cimbura.comhttp://www.cimbura.com

                  • 6. Re: Send Mail with Outlook 2011 for Mac
                    jss1

                    Tim,

                     

                    Have wrestled uunsuccessfully to reduce your script to what I need.

                     

                    When Mac mail was my client, I used FMP12's Send Mail [Send via E-mail Client; To:contacts ::emailaddress] living under a clickable graphic on my application's contact layout and all worked well for years. All it did was open a new message window in the Mac Mail client with my FMP contact's email address inserted in the "To". Perfect. Since new corporate policy enforces Outlook as the client, obviously my FMP12 script doesn't work anymore, even when Outlook Preferences have Outlook checked as the default mailer. I reckon some combination of FMP scripting and Applescript should be able to do what my old FMP script did, but it looks like it takes an OO programmer to decipher which components of the MS Outlook library to use - and I'm not an OO programmer.

                     

                    Am on OSX v10.8.4, FMP12.0v4, Outlook 2011 14.3.6

                     

                    You seem to hae some advanced scripting down. Maybe you can get me pointed in the right direction?

                     

                    Thanks

                     

                    Jeff (JSS1)

                    • 7. Re: Send Mail with Outlook 2011 for Mac
                      Peter Wagemans

                      Just wanted to park this AppleScript here, I had to make it today to have a customer with Outlook send multiple enclosures.

                      The enclosures were previously obtained as a list of POSIX paths using ScriptMaster.

                      This is an approach where the AppleScript obtains the parameters from a globals table that has a few parameters fields in it ( just 1 record ). I replaced the window name by something generic.

                       

                      set CR to a reference to (current record of layout "globals" of window "myApplication")

                       

                      set theEnclosureList to cell "emailEnclosures" of CR

                      set thePaths to paragraphs of theEnclosureList

                       

                      set theRecipientList to cell "emailRecipients" of CR

                      set theRecipients to paragraphs of theRecipientList

                       

                      set theSubject to cell "emailSubject" of CR

                      set theBody to cell "emailBody" of CR

                       

                      tell application "Microsoft Outlook"

                        set theMessage to make new outgoing message with properties {subject:theSubject, content:theBody}

                        repeat with theRecipient in theRecipients

                        make new bcc recipient at theMessage with properties {email address:{name:"", address:theRecipient}}

                        end repeat

                      end tell

                       

                      repeat with thePath in thePaths

                        set myFile to POSIX file thePath

                        tell application "Microsoft Outlook"

                        make new attachment at the end of theMessage with properties {file:myFile}

                        end tell

                      end repeat

                       

                      tell application "Microsoft Outlook"

                        open theMessage

                      end tell


                      • 8. Re: Send Mail with Outlook 2011 for Mac
                        CanDo!

                        Hi there Taylor 

                         

                        Long time no see!

                        I've just come across the problem of one of my client's computers not recognizing Outlook as their default email client.

                        They are using Outlook 2011 & FileMaker 14 on a Mac.

                         

                        You referred to the option for this switch lies in the OS.

                        Can you give me a clue as to where to go (and what to change in the system) to make Outlook the default email client?

                         

                        Thanks, my friend 

                         

                        Lucy Kaplan

                        CanDo!

                        • 9. Re: Send Mail with Outlook 2011 for Mac
                          mgaslowitz

                          Dave,

                           

                          Send via E-mail Client will throw an error1 for Mac Outlook users if the Message (body) section is empty; I've found passing in a carriage return is unobtrusive, and solves the issue for my users.

                           

                          Michael

                           

                          1 Error Code 3: Command is unavailable (for example, wrong operating system, wrong mode, etc.)

                          • 10. Re: Send Mail with Outlook 2011 for Mac
                            steveromig

                            Lucy Kaplan wrote:

                             

                            Hi there Taylor 

                             

                            Long time no see!

                            I've just come across the problem of one of my client's computers not recognizing Outlook as their default email client.

                            They are using Outlook 2011 & FileMaker 14 on a Mac.

                             

                            You referred to the option for this switch lies in the OS.

                            Can you give me a clue as to where to go (and what to change in the system) to make Outlook the default email client?

                             

                            Thanks, my friend 

                             

                            Lucy Kaplan

                            CanDo!

                             

                            If you are referring to how to change the default email client on the Mac - it is actually very easy but not found in the most intuitive of places.

                             

                            Launch the Mail app and in the preferences of Mail on the General tab you can change the "default email reader" to what you want.

                             

                            Steve Romig

                            FileMaker, Inc.

                            • 11. Re: Send Mail with Outlook 2011 for Mac
                              ibrahim_bittar

                              Only take into account that Outlook will put new emails in the Drafts folder and won't pop a new window like mail does.