Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6464 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I cannot find any info about trouble shooting this though I'm wondering from my reading of other posts is this something that can be done without a 3rd party plugin?

I have a button that runs a script to send an email with a pdf attachment.

Email script works except it will not attach the pdf.

I recently moved my solution from a peer to peer network to a filemaker server. (OK, let me have it - running server 5.5 and running FM 6 - because of conversion to 7 problems)

The email script used to work ONLY on the computer serving the peer to peer network. Attach the pdf and away the email went. But NOW that it is on the server I cannot get the pdf to go with the email!!

I have set the server to send and receive email. That works...it's just the dang pdf sits in the server folder.

Any help out there?

Thanks! David

  • Newbies
Posted

am running mac osx server, filmaker server 5.5 that serves 6 imacs running osx.

I am new to hosting the solution on a server.

The original script was written on the computer that hosted the peer-peer netwrok. Just moving the pdf files (generic pdfs - not being generated by filemaker) to the server would do the trick. No luck. SO, I wrote a new script from a computer accessing the server. No luck. I tried stop serving, open file, write script, move file back and start serving. Still no luck.

Any help would be greatly appreciated. Thanks!

Posted

You should consider migrating the solution then because the containerfield by version fm7 either reference or store your pdf's.

I have to caution you here! Thou must not have OS'level filesharing turned on the folder where the filemaker solution resides, it's a sure method to build up corruption in the solution. You need a different place to store you .pdf's!!!!

This means that with your solution must be an embedded applescript that generates the mail in the mail client, and includes the attachment while knowing where the actual .pdf is located.

A script like this is embeddable in a filemaker solution:

set theAttachment to choose file

tell application “Mail”

   set theMessage to make new outgoing message with properties {visible:true, 

   subject:”My Subject”, content:”My Body”}

   tell content of theMessage

      make new attachment with properties {file name:theAttachment} at after last paragraph

   end tell

end tell

So instead of the Choose statement is it possible to use database field values, to build the script via a filemaker calc'field

that this command:

http://www.filemaker.com/help/ScriptsRef-264.html

...uses.

For further tricks on AS'ing the Mail app, read this from where I snipped the script, you just saw:

http://www.mactech.com/articles/mactech/Vol.21/21.09/ScriptingMail/index.html

--sd

  • Newbies
Posted

Thank you for your help. This may be over my head...I guess I expected that since there was the option to attach a pdf in the email script it would just work. I thought that I was just overlooking a simple solution. I do appreciate your taking the time to help me. David

Posted

Well my remembrance of what is possible in fm6 is starting to evaporate, I'm afraid ...but what I fail to see, is how to deal with path issues without $variables at hand, maybe isn't applescript quite as needed as I thought, I can be forgetting something crucial here??

But what I can't have, is that your conclusion is that you after all havn't been overlooking something simple, when it here only is a matter of getting the syntax right in the customized AS made by the calc'field.

The deployment of an applescript is quite simple, the real trouble with AS is to digest the dictionary of each application the solution works with ... but here is it done, someone at mactech have relieved your and me from that burden.

Consider this like checking the oil on your cars engine, you might not have chance to think up a better lubrication ...but have to rely on recommendations from the producer, which oil-type suits your cars engine best, but it doesn't prevent you from following the given advice - does it?

If the car needs refilling you better get it done if the meter urges you! ...or is it something similar to religious refusion of bloodtransfusion we're talking about here??

Don't use this forum's posting as means to get confirmed the prejudice that you never ever will grasp a topic, if it appears to get solved from an unexpected angle!

With this day of age's blogging culture, might this:

http://www.economics.harvard.edu/faculty/mullainathan/papers/Coarse%20Thinking.pdf

...kind of make you do the distinction between pure frustration and the pragmatic getting things done, although some of the finer details still might be in the mist, for quite a while yet.

--sd

This topic is 6464 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.