December 14, 20169 yr Hi all, I know this should be easy but I am not getting it right. The mail gets sent but no attachment
December 14, 20169 yr Here's an old demo I posted that might help. Not really enough info to see what's going wrong with your script. What is the value in InvItems::_InvID ? I'm wondering if there's a value in there that is breaking the $Path.
December 14, 20169 yr Author Thanks for your response. The value in _InvId is just text (INXXXXXX). I am having trouble downloading the file above, I will keep trying it. 18 minutes ago, bcooney said: Here's an old demo I posted that might help. Not really enough info to see what's going wrong with your script. What is the value in InvItems::_InvID ? I'm wondering if there's a value in there that is breaking the $Path. Thanks I have downloaded the file and apart from selecting a temporary path I can see no difference. I have stepped through with Script Debugger but I can't tell if the PDF is actually being created
December 14, 20169 yr Stop the script after the Save as PDF. Add the Auto Open to this script step. Do you see your PDF?
December 14, 20169 yr Author Hi, yes the PDF opens ???? I put a field on the layout while trying to figure out what was going wrong with the calculation Get (TemporaryPath), I then copied that and put it into the finder GoToFolder field and got the error message "This Folder Can Not Be Found"
December 14, 20169 yr Quote Hi, yes the PDF opens ???? Is that a question? If the PDF opens, then let's assume that it is successfully being created. Do you have FM Advanced? If so, you can step the script and see where you get errors. If you put the dialog back ON in Send Mail it'll give you a chance to see if the PDF is attached.
December 14, 20169 yr Author With the dialog On the attachment is sent so I turned it off again and stepped through it as before and the attachment is not present again. It appears that the attachment requires time to be attached before sending, how do I achieve that
December 14, 20169 yr must the path be prefixed with "file:" maybe? "file:$path" (or switch to plugin for sending email with more options)
December 14, 20169 yr Author Hi, after I had posted the script on here I added a 2 second pause after the Save Records as PDF step to see if that helped. I am using FM 15 Advanced so I am using the script debugger to step through it. There are no errors shown but if I turn the dialog off on the Send Mail script step the attachment doesn't appear but the email is received.
December 14, 20169 yr Author 11 minutes ago, MonkeybreadSoftware said: must the path be prefixed with "file:" maybe? "file:$path" (or switch to plugin for sending email with more options) It doesn't appear to have a problem finding the file it just will not attach it without the dialog 1 minute ago, bcooney said: http://help.filemaker.com/app/answers/detail/a_id/15733/kw/send mail What OS? OS X 10.11.6 El capitan Thank you bcooney, that appears to be the problem. We were intending to move to using a plugin and smtp but were just trying to get our ducks in a row, now I know that the simple solution we were testing on may not be so simple
December 14, 20169 yr we just use a plugin - the number of exceptions and workarounds required to keep emailing working correctly across multiple devices and platforms is just too 'hack' and loses us time and development
December 22, 20169 yr On 14 December, 2016 at 9:14 PM, bcooney said: Try adding a Pause before Send Mail. Anything from 2-5 secs for PDF to write to disk in full depending on server spec may be needed. Or do shell script server side "sync;sync" if the server is a mac. Edited December 22, 20169 yr by ggt667
December 23, 20169 yr The FileMaker support article that is linked above provides the reason for your problem, there has been a bug between FileMaker and OS X for a couple of versions (of both) now, and it means that the 'Perform without Dialog' option cannot be used with OS X Mail. The article provides workarounds, but essentially you have to switch that option off (and the user will have to click 'Send' in OS X Mail), or send email via the built-in SMTP feature. As Webko says, using a plug-in may be your best bet for better functionality, although not possible on FileMaker Go unless PSOS is an option for you.
December 23, 20169 yr Author Thank you for your input. We had decided to go via SMTP as a fair number of the mail messages will be sent from Filemaker Go. SMTP however is creating it's own issues as there are apparently problems with Office365, which is our SMTP server and also that some servers don't accept TLS 1.0, which FM uses.
December 23, 20169 yr Can you email them from Server? MBS Plugin can email via CURL functions with TLS 1.0 on a FM Server or FM Pro.
Create an account or sign in to comment