Oyseka Posted December 14, 2016 Posted December 14, 2016 Hi all, I know this should be easy but I am not getting it right. The mail gets sent but no attachment
bcooney Posted December 14, 2016 Posted December 14, 2016 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.
Oyseka Posted December 14, 2016 Author Posted December 14, 2016 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
bcooney Posted December 14, 2016 Posted December 14, 2016 Stop the script after the Save as PDF. Add the Auto Open to this script step. Do you see your PDF?
Oyseka Posted December 14, 2016 Author Posted December 14, 2016 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"
bcooney Posted December 14, 2016 Posted December 14, 2016 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.
Oyseka Posted December 14, 2016 Author Posted December 14, 2016 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
MonkeybreadSoftware Posted December 14, 2016 Posted December 14, 2016 must the path be prefixed with "file:" maybe? "file:$path" (or switch to plugin for sending email with more options)
Oyseka Posted December 14, 2016 Author Posted December 14, 2016 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.
bcooney Posted December 14, 2016 Posted December 14, 2016 http://help.filemaker.com/app/answers/detail/a_id/15733/kw/send mail What OS? 1
Oyseka Posted December 14, 2016 Author Posted December 14, 2016 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
bcooney Posted December 14, 2016 Posted December 14, 2016 If only FMI would provide a better Send Mail.
webko Posted December 14, 2016 Posted December 14, 2016 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
ggt667 Posted December 22, 2016 Posted December 22, 2016 (edited) 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, 2016 by ggt667
rwoods Posted December 23, 2016 Posted December 23, 2016 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.
Oyseka Posted December 23, 2016 Author Posted December 23, 2016 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.
MonkeybreadSoftware Posted December 23, 2016 Posted December 23, 2016 Can you email them from Server? MBS Plugin can email via CURL functions with TLS 1.0 on a FM Server or FM Pro.
Recommended Posts
This topic is 3164 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now