jandebs Posted April 25, 2008 Share Posted April 25, 2008 hi, i'm sending email with a pdf attachment from a bunch of records, each with their own email addresses. I can save the pdf down onto the desktop using a variable to define the output path but can't get the mailto scriptstep to pick it up again as an attachment. I just get the email address and subject line from the record. Conversely, perversely, ( i'm half way through a bottle of pinot g. on this one ) I can get the pdf into the email with 'create email with file as attachment' but no email address etc.. I'm getting the impression it's either one or the other. Any ideas? jan Link to comment Share on other sites More sharing options...
AHunter3 Posted April 25, 2008 Share Posted April 25, 2008 Are you using Send Mail or Open URL ["mailto:"] as your approach to sending the email? Link to comment Share on other sites More sharing options...
jandebs Posted April 25, 2008 Author Share Posted April 25, 2008 hi Ahunter3, have to ask, do they address you down the pub as Ahunter3? 'Hey Ahunter 3! mine's a lager! or chardonnay maybe. depending on who you're drinking with. Anyway, yes ta for enlightening me on the open URL route. Didn't know it did the local mail too. But i can't see anywhere glaringly obvious where i can put a path in for an attachment. i have no business being in the database world as i am basically a semi gifted amateur, regrettably in another field. So you'll have to forgive me if i get the slightest hint you know a heap more than i do, and i barrage you with questions. The URL path for the address has to be prefixed with mailto: and i'm guessing that's the syntax for OS operations, so was wondering if there was another recognised field definition for body: which could pick up the attachment from a container field. Maybe that path could be added as a value with mailto: jan Link to comment Share on other sites More sharing options...
jandebs Posted April 25, 2008 Author Share Posted April 25, 2008 oh yes, the question.. am using Sendmail. Link to comment Share on other sites More sharing options...
AHunter3 Posted April 25, 2008 Share Posted April 25, 2008 Send Mail is indeed what you want. Open URL doesn't support attachments, that's why I asked. Can you copy and paste EXACTLY what you are using as the path to the PDF you're trying to attach, right there as part of your Send Mail script step? I recommend the filemac: format; and assuming you're using functions like Get(DesktopPath) or Get(DocumentsPath), set a $variable to the path prior to the Send Mail script step, and then for the file attachment path use the $variable Link to comment Share on other sites More sharing options...
jandebs Posted April 26, 2008 Author Share Posted April 26, 2008 hi Ahunter3 Here's the script I'm using. While I was copying it, I changed the variable from global to local as you mentioned in your reply, and running the script as below it now works! Marvelous! So ta for that. Regarding the Get(DesktopPath) in the variable, should I be prefixing it with filemac: ? # # Set Variable [ $desktop; Value:Get ( DesktopPath ) & “/†& “voucher.pdf†] Save Records as PDF [ File Name: “file:$desktopâ€; Current record ] [ Document - Title: “voucherâ€; Compatibility: Acrobat 5 and later ] [ Pages - Number Pages From: 1; Include: All pages ] [ Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ] [ Initial View - Show: Page Only; Page Layout: Single Page; Magnification: 100% ] [ Restore; No dialog ] # #compile email Send Mail [ To: vouchers::emailaddress; Subject: vouchers::emailsubject; Attachment: “$Desktop†] # # # # thanks again, a great help. jan Link to comment Share on other sites More sharing options...
AHunter3 Posted April 26, 2008 Share Posted April 26, 2008 Should I be prefixing it with filemac: ? Umm, ignore that. Get(DesktopPath) will automatically return the right "path type". I think what I meant to say was that if you were using a calc that did not reference such a function, you'd want to assemble your path using "filemac". Or "filewin" for PC users. Saving PDF file to a file server for example. Link to comment Share on other sites More sharing options...
jandebs Posted April 26, 2008 Author Share Posted April 26, 2008 all good, Ahunter3, all runs just great. last question re Get(DesktopPath): does it return the right result on a windows box? am on mac OS ta again, jan Link to comment Share on other sites More sharing options...
AHunter3 Posted April 26, 2008 Share Posted April 26, 2008 It should, yes. It will be a "filewin:" path when you run it on the PC. Link to comment Share on other sites More sharing options...
jandebs Posted April 27, 2008 Author Share Posted April 27, 2008 thanks again! Link to comment Share on other sites More sharing options...
Recommended Posts