VISUAL QUICKPRO GUIDE FileMaker Pro 7 Advanced FOR WINDOWS AND MACINTOSH [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

VISUAL QUICKPRO GUIDE FileMaker Pro 7 Advanced FOR WINDOWS AND MACINTOSH [Electronic resources] - نسخه متنی

Cynthia L. Baron, Daniel Peck

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید











Using Scripts to Send Email


FileMaker isn't an email program, but you can make it act as if it were. If you're using one of the following email applications as your default email software, FileMaker can access it from within your database.

Macintosh

Windows

Eudora

Exchange

Entourage

Outlook

OS X Mail

All MAPI-compliant email programs

You'll notice a glaring omission. Unfortunately, AOL software does not work directly with FileMaker's Send Mail scripting command. If you have fields for an email address and an Internet URL in a contact table, FileMaker scripting can give you direct access to your customers. You first need to set up an email-message layout, then set up the script that will actually send the message.

Before you follow these instructions, add four additional text fields to the database file you plan to use: Mailcc, Mailbcc, Mail Subject, and Mail Body. With these fields, you'll be able to create a FileMaker layout similar to the window you use to send mail in your email software.

To create an email layout



1 .Choose View > Layout Mode (Control+L/Command+L).

2 .Choose Layouts > New Layout/Report (Control+N/Command+N).

3 .

When the New Layout/Report dialog box appears, give the layout a name (we use Email). Click "Blank layout" in the "Select a layout type" menu. Click Finish.

4 .

Drag the Header and Footer tabs up until they disappear. Drag the Body tab down to fill the screen.

5 .Drag the Field tool into the layout. Choose your email address field from the Specify Field dialog box (Figure 11.1). Click OK.

Figure 11.1. Add the Email Address field to the Email layout by choosing it in the Specify Field dialog box.


6 .Holding the Control/Option key, drag the Email Address field to duplicate it.

7 .

When the Specify Field dialog box appears, double-click the Mailcc field to choose it (Figure 11.2).

Figure 11.2. After duplicating the first field, specify a different field for the copy.


8 .

Repeat steps 6 and 7 for the Mailbcc, Subject, and Body fields.

When creating the Body field, uncheck the "Create field label" check box.

9 .

Resize all the fields as necessary to allow enough room for addresses and the text of an email message (Figure 11.3).

Figure 11.3. Enlarge the fields to allow room for the longest sections you expect to need.


[View full size image]


To use these fields to compose and send a message, see the next section.

To create an email script



1 .Choose Scripts > ScriptMaker (Control+Shift+S/ Command+Shift+S).

2 .In the Define Scripts dialog box, click New. When the Edit Script dialog box appears, enter a name for your script (we use Send Email) (Figure 11.4).

Figure 11.4. Type a name that describes what the script does.


[View full size image]

3 .

In the script step list on the left, scroll down to Miscellaneous and double-click Send Mail (Figure 11.5).

Figure 11.5. Add the Send Mail step to the script.


4 .In the script-assembly list, double-click the Send Mail step to bring up the Specify Mail dialog box.

5 .In the To: section, click the button to the right of the input box and choose Specify Field Name (Figure 11.6).

Figure 11.6. Choose Specify Field Name to use the value in the Email field.


6 .When the Specify Field dialog box appears, choose your email address field from the scrolling list (Figure 11.7). Click OK.

Figure 11.7. Specify the field that contains the email address.


7 .

Repeat steps 5 and 6 for the CC, BCC, Subject, and Message sections, choosing the appropriate fields in the Specify Fields dialog box (Figure 11.8). Click OK to finish.

Figure 11.8. To insert the field contents into the email areas, specify each field.


When you return to the Edit Script dialog box, the Send Mail script line will include the chosen fields (Figure 11.9).

Figure 11.9. Send Mail shows the email settings in the script-assembly list.


8 .

Check "Perform without dialog" under Options to queue or send the messages without having to interact with the email program (Figure 11.10).

Figure 11.10. If you want to review the contents of the message in your email program before it is sent, leave the "Perform without dialog" box unchecked.


If you leave this box unchecked, the message will open in your email program and wait for you to manually send it. If you expect to send attachments occasionally, you might prefer to leave the box unchecked so you can do this selectively in the email program. No matter what you eventually plan to do, leave the box unchecked while you build the script so you can test your work.

9 .Click OK twice to finish. When you run the script, FileMaker will send the data you entered into the appropriate fields in your email program.


Chapter 9, "Extending the Interface with Scripts."


/ 227