Mike_K

PLEASE HELP!!  Upgraded to OS Sierra, and now I can't email with a PDF attachment!

Discussion created by Mike_K on May 25, 2017
Latest reply on Oct 19, 2017 by malibux14x

I've spent the entire day trying to find a solution to this.  I've found a lot of "similar" issues, but EVERY SINGLE workaround or suggestion is either not quite applicable, or DOESN'T WORK!!

 

ISSUE:

Since upgrading my OS to Sierra, any time I try to send an email with a PDF attached, the attachment doesn't show up.

 

This has worked perfectly before, and I'm open to using Applescript (which is what I was using so I could attach more than one PDF), or I can use Send Mail via Client or SMTP.

 

MY SETUP:

Mac OS Sierra v.10.12.5

Filemaker Pro Advanced 15

Need a solution for Filemaker Network (some LAN files, also some FMServer files - both accessed through Filemaker Network)

Applescript is currently method of choice for emailing.

I'm hesitant to use any plugins as they seem to make things a bit more complicated than they need to be.

 

MY SCRIPT:

- Global Variables $$Signature and $$PATH are already predefined.  $$PATH is the PDF file, $$Signature is a signature based on the current user.

- All identifying information has been changed.  I don't have a company called Millions 2 Spend... yet...

- At the beginning of the script, I've tried including the following to control the delay in case it was being interrupted:

     (Thank you Chris for the contribution from another post)

 

"on delay duration" & ¶ &

   "set endTime to (current date) + duration" & ¶ &

   "repeat while (current date) is less than endTime" & ¶ &

      "tell AppleScript to delay endTime - (current date)" & ¶ &

   "end repeat" & ¶ &

"end delay" & ¶ &

============================================

With or without the above script, including the delays as indicated in the script below, solved nothing.

 

The following is my script as it is currently, and as it has always worked for me:

============================================

 

"set therecipientAddress to \"" & Invoices::AP Contact & " <" & Invoices::AP Email & ">\"" & ¶  &

"set thebccRecipients to {\"Laura Konrad <laura@millions2spend.com>\"}" & ¶  &

"set theSubject to \"" & "Invoice #" & Invoices::Invoice ID & " | " & "Millions 2 Spend\"" & ¶  &

"set theAttachment1 to \"" & $$Signature & "\"" & ¶  &

"set theAttachment2 to \"" & $$PATH & "\"" & ¶  &

 

"set theContent to \"" & If ( IsEmpty ( Invoices::AP First Name ) ; "Attn: Accounts Payable," ; "Hi "  & Invoices::AP First Name & "," ) & ¶ &

¶ &

"Please find attached invoice # " & Invoices::Invoice ID & " for work complete at "& Invoices::Job Location Name & "."  & ¶ &

& "Thank you so much for the work and please let us know when you have any further requirements." & ¶ &

¶ &

"Regards,"  & ¶ & ¶ &

"Laura" & ¶ & ¶ & ¶ &"\"" & ¶ & ¶ &

 

"tell application \"Mail\"" & ¶  & ¶  &

"reopen" & ¶  &

"activate" & ¶  &

"set theMessage to make new outgoing message with properties {subject:theSubject , content:theContent, visible:true}" & ¶  &

 

           "tell theMessage"&  ¶  &

               "make new to recipient at end of to recipients with properties {address:therecipientAddress}" & ¶  &

 

                  "tell theMessage" &  ¶  &

                        "make new bcc recipient at end of bcc recipients with properties {address:thebccRecipients}" & ¶  &

 

                           "tell theMessage to make new attachment with properties {file name:theAttachment1} at after last paragraph" & ¶  &

 

// At this point, I've tried adding  { "delay 3" & ¶  & } but it didn't help.

 

                             "tell theMessage to make new attachment with properties {file name:theAttachment2} at after last paragraph" & ¶  &

 

// At this point as well, I've tried adding  { "delay 3" & ¶  & } at the same time as the above addition, but it didn't help.

 

 

                  "end tell" & ¶  &

 

           "end tell" & ¶  &

     "##end tell" & ¶  &

 

"end tell"

 

==============================================================

 

PLEASE SOMEBODY HELP!  I will eternally consider you my superior, and pay homage to your name during my daily meditations...

 

Thanks so much,

 

Mike

Outcomes