Kirsty Hannam Posted February 12, 2008 Share Posted February 12, 2008 Hi guys, I've written a script which saves a report as PDF into a specified folder, then creates an email (with text) and attachs the report ready to send. This works fine on my Mac with the Mail application. However, I've just tested it on a PC with Groupwise and it creates the PDF file in the specified folder, and creates the email with all the right text etc. - however, it doesn't attach the PDF to the email. After pouring over my code and not finding anything, I tried changing various things and what I've found is that if I shorten the text in my email (considerably), it does work. As soon as I add more text, it stops working again - i.e. email with no attachment. Weird - I've got no explanation for it. The script just works as it should on Mac Mail but I can't get round this odd problem with Groupwise. As the solution is going to run on a machine that only has access to Groupwise, I'm not sure how I'm going to get this to work. Any suggestions? Link to comment Share on other sites More sharing options...
Jack Rodgers Posted February 12, 2008 Share Posted February 12, 2008 Short of the solution you seek, an obvious temp fix is to send TWO emails, one with the text and one with the attachment. Link to comment Share on other sites More sharing options...
Kirsty Hannam Posted February 13, 2008 Author Share Posted February 13, 2008 Could do but that doesn't really fix the problem - especially as I've got nearly a hundred emails to send out, which would mean two hundred instead. I don't like unexplained problems and I can't seem to figure out why Groupwise is behaving so oddly. The same script works fine on my Mac and I've tested it on a PC with the usual Windows set up. Unfortunately, this script has to run on a PC that uses Groupwise. I've used other FileMaker email scripts in the same solution, which run OK on Groupwise. Just seems to be something odd about this one that I can't get to the bottom of, and it seems to have something to do with the length of the email. Bizarre. Link to comment Share on other sites More sharing options...
doughemi Posted February 14, 2008 Share Posted February 14, 2008 I have had scripts that got internally corrupted and started doing goofy things sometimes. The solution was to delete the script and re-enter it from scratch. Might be worth a try. --Doug Link to comment Share on other sites More sharing options...
HBMarlowe Posted February 14, 2008 Share Posted February 14, 2008 I have had scripts that got internally corrupted and started doing goofy things sometimes. The solution was to delete the script and re-enter it from scratch. Might be worth a try. --Doug And if you're using Advanced you can copy and paste it from a known good backup or clone. Link to comment Share on other sites More sharing options...
Jack Rodgers Posted February 14, 2008 Share Posted February 14, 2008 Based on what you've said it is the length of the email text that seems to be the problem. Shortening the email bypasses the problem. Have you determined the amount of text needed to cause the problem? Have you tried a manual test, copying the text you want to send and paste it into Groupwise and then attach the pdf file. This seems an important test. If this test passes with flying colors then there is some problem with Filemaker such as a problem handling how ever much text you are sending or even a spurious character in that text, such as Command+M instead of Shift+M. Answer these two questions and we can proceed. Here's a Novel user group: http://www.novell.com/coolsolutions/gwmag/ Link to comment Share on other sites More sharing options...
Kirsty Hannam Posted February 14, 2008 Author Share Posted February 14, 2008 I have had scripts that got internally corrupted and started doing goofy things sometimes. The solution was to delete the script and re-enter it from scratch. Might be worth a try. I've had that happen sometimes too. I think I'll try re-typing it. I've got Advanced but I've found that if a script is corrupt, sometimes copying & pasting doesn't do the trick and you have to re-type from scratch, which is a real bind. It's a pretty ordinary sized email - I'm not at that computer right now, so I can't get in and do a word count, but it isn't huge. I've tried: 1. Running the script on my Mac (Mail) - works fine 2. Copying & pasting the text into a Groupwise email, then manually attaching the PDF - works fine 3. Running the script (which creates the email without attaching the PDF) and manually attaching the PDF - works fine 4. Shortening the text (has to be shortened by a LOT) - works fine 5. Removing all the carriage returns and making it one large paragraph - didn't work Anyway, these emails had to be sent out yesterday, so I ran the script, which created all the emails (minus attachments) and manually added each attachment. A real pain but I'll keep trying to get to the bottom of this, as these emails will be a regular job so it'll come round again in a few months. Next time I'm at that machine, I'm going to do a word count, then change the script to use Lorem Ipsum text of the same length just to see what that does. I'll keep you posted. Thanks for all the advice. K Link to comment Share on other sites More sharing options...
Jack Rodgers Posted February 14, 2008 Share Posted February 14, 2008 Last Suggestion: Recreate the script on the computer that will use it. Not every function works equally well cross platform. Link to comment Share on other sites More sharing options...
Recommended Posts