dbTalk Databases Forums  

Automating emails with attachments

comp.databases.filemaker comp.databases.filemaker


Discuss Automating emails with attachments in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Smurf
 
Posts: n/a

Default Automating emails with attachments - 10-05-2009 , 05:53 PM






FM 8.5
I am trying to automate my Invoicing such that I can script a button
to create an email with a pdf of the current Invoice attached. This is
what I did. table INVOICES 2008 (has relationship with CONTACTS)

Print Setup
Save Record As PDF
specify output file = file:/Users/Matthew/Desktop/ Orders/ To
be delivered/ Invoices
specify options = Current Record
Send Mail
To: CONTACTS::Accounting_Contact_Email
Attach file: filemac:/Users/Matthew/Desktop/ Orders/ To be
delivered/ Invoices

It returns the error
"Invoices could not be created on this disk."

Perhaps my file paths are written wrong? The PDF path I mean to save
the pdf in a folder called Invoices. Attach file I mean to take me to
the file where pdf was saved.

Can you help?
Thanks
Matthew

Reply With Quote
  #2  
Old   
Your Name
 
Posts: n/a

Default Re: Automating emails with attachments - 10-05-2009 , 08:18 PM






"Smurf" <wearesmurfs (AT) yahoo (DOT) ca> wrote

Quote:
FM 8.5
I am trying to automate my Invoicing such that I can script a button
to create an email with a pdf of the current Invoice attached. This is
what I did. table INVOICES 2008 (has relationship with CONTACTS)

Print Setup
Save Record As PDF
specify output file = file:/Users/Matthew/Desktop/ Orders/ To
be delivered/ Invoices
specify options = Current Record
Send Mail
To: CONTACTS::Accounting_Contact_Email
Attach file: filemac:/Users/Matthew/Desktop/ Orders/ To be
delivered/ Invoices

It returns the error
"Invoices could not be created on this disk."

Perhaps my file paths are written wrong? The PDF path I mean to save
the pdf in a folder called Invoices. Attach file I mean to take me to
the file where pdf was saved.

Can you help?
It could just be a typo in posting the Script here, but the two filepaths
begin differently.

The first output file one says:
file:/Users

and the second says:
filemac:/Users


Helpfull Harry )

Reply With Quote
  #3  
Old   
Smurf
 
Posts: n/a

Default Re: Automating emails with attachments - 10-07-2009 , 10:41 AM



On Oct 5, 6:18*pm, "Your Name" <your.n... (AT) isp (DOT) com> wrote:
Quote:
"Smurf" <wearesmu... (AT) yahoo (DOT) ca> wrote in message

news:3655970d-9277-40f9-bd7a-9f575f3b3822 (AT) l31g2000vbp (DOT) googlegroups.com...





FM 8.5
I am trying to automate my Invoicing such that I can script a button
to create an email with a pdf of the current Invoice attached. This is
what I did. table INVOICES 2008 (has relationship with CONTACTS)

Print Setup
Save Record As PDF
* * specify output file = file:/Users/Matthew/Desktop/ * Orders/ * *To
be delivered/ *Invoices
* * specify options = Current Record
Send Mail
To: CONTACTS::Accounting_Contact_Email
Attach file: filemac:/Users/Matthew/Desktop/ * Orders/ *To be
delivered/ *Invoices

It returns the error
"Invoices could not be created on this disk."

Perhaps my file paths are written wrong? The PDF path I mean to save
the pdf in a folder called Invoices. Attach file I mean to take me to
the file where pdf was saved.

Can you help?

It could just be a typo in posting the Script here, but the two filepaths
begin differently.

The first output file one says:
* * * file:/Users

and the second says:
* * * filemac:/Users

Helpfull Harry * )
Yes, that is correct. When reading this scripting note on Filemaker I
am unclear what they are saying. Are they saying if Mac (I am), write,
filemac:/Users or file:/Users or /Users/... Perhaps you can clarify
this much for me.

Thanks

Reply With Quote
  #4  
Old   
Your Name
 
Posts: n/a

Default Re: Automating emails with attachments - 10-07-2009 , 03:17 PM



"Smurf" <wearesmurfs (AT) yahoo (DOT) ca> wrote

On Oct 5, 6:18 pm, "Your Name" <your.n... (AT) isp (DOT) com> wrote:
Quote:
"Smurf" <wearesmu... (AT) yahoo (DOT) ca> wrote in message

news:3655970d-9277-40f9-bd7a-9f575f3b3822 (AT) l31g2000vbp (DOT) googlegroups.com...

FM 8.5
I am trying to automate my Invoicing such that I can script a button
to create an email with a pdf of the current Invoice attached. This is
what I did. table INVOICES 2008 (has relationship with CONTACTS)

Print Setup
Save Record As PDF
specify output file = file:/Users/Matthew/Desktop/ Orders/ To
be delivered/ Invoices
specify options = Current Record
Send Mail
To: CONTACTS::Accounting_Contact_Email
Attach file: filemac:/Users/Matthew/Desktop/ Orders/ To be
delivered/ Invoices

It returns the error
"Invoices could not be created on this disk."

Perhaps my file paths are written wrong? The PDF path I mean to save
the pdf in a folder called Invoices. Attach file I mean to take me to
the file where pdf was saved.

Can you help?

It could just be a typo in posting the Script here, but the two
filepaths
begin differently.

The first output file one says:
file:/Users

and the second says:
filemac:/Users

Yes, that is correct. When reading this scripting note on Filemaker I
am unclear what they are saying. Are they saying if Mac (I am), write,
filemac:/Users or file:/Users or /Users/... Perhaps you can clarify
this much for me.

Thanks
Usually I'm only using FileMaker 5.5 which doesn't have this, but by chance
I was trying to get a FileMaker 9 database to export to the Mac Desktop
yesterday.

From what I understand of the Help file ...

"file:" is used for locations that are relative to the database files

"filemac:" is used for locations with a full filepath

What you need to use is "filemac:" ... BUT you've also only got a partial
filepath there since you can't start with "Users". In the full filepath
there should at least be the drive name and possibly other folder names
before of that (I'm not using MacOS X here to check what it is).

I don't know if these are in FileMaker 8.5, but in yesterday's work with
FileMaker 9 I found the Get(DesktopPath) function which returns the filepath
to the current user's Desktop. This meant I was able to have the following
export Script:
Set Variable [$Path; Get(DesktopPath) & "MyFile.csv"]
Export [No Dialog; $Path]


Helpfull Harry )

Reply With Quote
  #5  
Old   
jahn
 
Posts: n/a

Default Re: Automating emails with attachments - 10-08-2009 , 08:27 PM



Harry's got it right. I work on a Mac and always use the Get
(DesktopPath) function plus the name of the file I'm creating to set
the variable. Then I use the variable as the full path name. I don't
know if it's still the case with FM10, but when I was using FM 8.5,
the program used two different syntaxes depending on whether you were
getting a path or putting to a path. They may have straightened it
out since then. Better just to define a variable then hard code it.

-J.

Reply With Quote
  #6  
Old   
Your Name
 
Posts: n/a

Default Re: Automating emails with attachments - 10-09-2009 , 12:19 AM



There is of course and added problem here in that different email
applications behave differently to the Send Mail command ... but there's no
way around that (unless you want to write an AppleScript to create the
emails). (

Helpfull Harry )

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.