How to add printPdf file on email ?
How to add printPdf file in mail, like filemaker. When press on mail button popup mail with name, subject cet. But how add .Pdf invioce in email.
10 replies
-
I support this question. I have found answers like "create a button and use a function sendEmail({})" to achieve this, but this solution doesn't suit me because it can send email only from address used in Ninox. When pressing built in button in email field it fires up iOS mail and I like that, but it doesn't seem to support adding attachments.
-
let c:= importFile(this, printAndSaveRecord(this, "My Print Layout"), "mypdf.pdf");
sendEmail({
from: "recipient@domain.com",
to: "recipient@domain.com",
subject: "Hello World!",
text: "Some text",
html: "<h1>Some Text</h1><i>With Markup</i>",attachments :c
}) -
I too am looking for a solution to allow me to send a PDF of a specified print layout to a email address define in the current record.
The print layout name in my case is "Traveller"
The email address is named "IssueEmailto"
-
so its:
–––
let c:= importFile(this, printAndSaveRecord(this, "Traveller"), "mypdf.pdf");
sendEmail({
from: text(userEmail()),
to: text('IssueEmailto'),
subject: "Hello World!",
text: "Some text",
html: "<h1>Some Text</h1><i>With Markup</i>",
attachments :c
})
–––
-
Does this work on the desktop version?
-
No
-
Hm, Is that a permanent thing? I especially bought the Ninox OS X app because I wanted a versatile database program that didn't rely on data in the cloud and a subscription model. Now I keep stumbling on functionalities that I really need and are only available on Ninox cloud. That worries me a lot! Makes me think the desktop app is out there to die and a way of luring customers to the cloud.
-
I bought the Ninox OS X app too since I don't need Ninox cloud (for now at least).
Let's hope we will prove wrong...
-
Hello,
i Think a combination of Excel-Export, Apple Script and Hazel can solve your problem.
I don't either need the cloud-version of Ninox (and for some work it is not allowed to save the data outside).
I needed bulk E-Mail and found a solution:
Export your data/table as Excel-Sheet so that you have your fields you need in the columns of the Excel-Sheet. You can also immediately open the Sheet in Excel (without saving).
Start the following Apple-Script - done.
property thesender : "YourName <Your EMail Adress>" -- like given in Mail.app
tell application "Microsoft Excel"
set lastrow to first row index of (get end (last cell of column 1 of sheet 1) direction toward the top)
end tell
repeat with i from 2 to lastrow
tell application "Microsoft Excel"
set field1 to value of column 1 of row i of sheet 1 of active workbook as text
set field2 to value of column 2 of row i of sheet 1 of active workbook as text
set field3 to value of column 3 of row i of sheet 1 of active workbook as text
set field4 to value of column 4 of row i of sheet 1 of active workbook as text
set field5 to value of column 5 of row i of sheet 1 of active workbook as text
set field6 to value of column 6 of row i of sheet 1 of active workbook as text
end tell
tell application "Mail"
set newemail to make new outgoing message with properties {content:"Dear" & field1 & space & field2 & space & field3 & return & return & "here your text wiith other fields and" & variables & "Thanks", visible:true, subject:"your subject"}
set sender of newemail to thesender
tell newemail
make new to recipient at end of to recipients with properties {name:field2, address:field4}
-- column 4 is the email-adrressend tell
end tell
end repeat
I have this from here:
https://www.youtube.com/watch?v=wbHVJGppsOE
Attention: the mentioned function message signature in the video does not work anymore sinde Mac OS High Sierra.
With the help of Hazel and additional code it should be possible to get a full automatisation of the process witth individual PDF-Attachment.
Maurice
-
Hello,
I forgot: the function visible is set to true in my example. That means that the E-Mail Windows are shown (for experimental purposes). If you set it to false the script runs through.
Maurice
Content aside
- 5 yrs agoLast active
- 10Replies
- 4232Views