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

Batch e-mails with unique PDF attachments? Ideas please.


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

Recommended Posts

Posted

A system I'm working on needs to be able to generate batch e-mails for orders received each day. E-mail out to each person ordering. The end users want to print (or save) a PDF version of their "official" order form and attach this to the e-mail, then just have a basic piece of info in the email, e.g. "Dear Mr A your order 12345 is attached".

Their systems run an Exchange server and Outlook 2000 and 2003 on the desktops.

My idea is to create the PDFs and save with a ID number for the order, and then generate a filepath for attachment, if this is possible in the Send Mail script.

The Save Records as PDF, has an option to attach to an e-mail, but it appears you can't script any details of the e-mail, so for a batch it'd be useless.

If this isn't possible I'd want to create a highly structured HTML e-mail, matching their order form as close as possible, but can this be done via FMP?

I've just run some basic send mail tests, firstly the mail seems to be always created in plain text, is there a way around this?

Secondly batch e-mails, as no doubt you are aware fed into Outlook trigger the "a program is automatically trying to send e-mail..." alert to be displayed, requiring the user to click yes every 5 seconds for each message. Very tedious. I'm aware of tools such as ClickYes and in Access based systems, I've easily interacted with Outlook directly via VBA to prevent this happening.

Thoughts, opinions and ideas please? As it doesn't seem as straight forward in FileMaker as it is using VBA...

I've had a brief look at plug-ins like [color:blue]mail-it, but I think they would want mail going into Outlook first, rather than connecting directly out, as they are part of a large corporate network.

(This project is using FMP v8.5 and Server v8 on Windows 2000 and XP - however if FMP v9 offers a better set of tools for batch emails, we can upgrade this project.)

Posted

FM's send mail only supports plain text email. If you want the emails to first go to an Outlook Outbox, then check out Productive Computing's Outlook Manipulator (or Exchange) plugin.

Posted

Thanks for that bcooney I'll have a look.

We don't want to directly interact with the Exchange server (for all manner of reasons), just generating e-mails into the users Outlook.

For batch PDFs I'm thinking of saving each one to a temporarily folder with an ID, then sending an e-mail, attaching the specific ID PDF, then looping through, I'm not sure any plug in will handle that. I can do it all in FMP, but obviously I'll get the Outlook alert every time a message gets sent!

Any other ideas, thoughts and comments of achieving this and similar solutions?

Posted

1.

PDF's should be generated into the OS's temp folders.

That way, in time, the system will clean them out automatically.

$$tmp = Left ( Get(DesktopPath) ; Position ( Get(DesktopPath) ; "/" ; 1 ; 2 )-1) & "/private/tmp/" //MACONTOSH

$$temp = "C:/WINDOWS/Temp/" //WINDOWS

2.

you will want a custom name for the pdf.

$file =

3.

then you will want the full path to save the file to.

$path = $$tmp & $file & ".pdf"

4.

Save Record as PDF, and put $path in the file path.

5.

There are two options for sending an email from filemaker.

- Send email; which you would fill in the basic parameters, and for the attachment use the variable $path.

- Open URL; which you can build an html string to generate an email.

I can't remember with outlook, but one of the options will bypass the warning, and send it, or puts it in the draft folder. You may also have to play with 'Perform without dialog' option. Or add and vb script to check for your items in draft folder and send.

-=-=-=-=-=

as for the formatting of the email, there is the option of creating an ".html" file in the same temp folder, which would reference the pdf, Then attach that html file to the outlook message, which would render the body accordingly. See thread

  • 2 weeks later...
Posted

I'd use Get (TemporaryPath) a new function in FM9. Yes, this folder eventually is cleared by the OS.

However, I think that creating the email and the pdf at the same time will work better than trying to attach pre-existing pdf docs.

Outlook Manipulator doesn't interact with Exchange, just puts the email in the Outbox.

This topic is 6034 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.