Jump to content

Send Mail using Entourage


Steve Nanz

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

Recommended Posts

  • Newbies

Thanks for the help. I actually did try going to http://www.macscripter.net/ but was unable to locate a script which contained the steps for going to the drafts folder and opening the newly created email generated by the Send Mail script in FileMaker. Any other suggestions?

Link to comment
Share on other sites

Here's a basic script to get you started - I'm not an AppleScript expert but it seems to do what you want. It still leaves the drafts folder (I'd say you have do that with any new message) but it opens it so you can add text if you want. You can do some really cool stuff with Entourage and AppleScript:

property DefaultAddress ??? "[email protected]"

on run

try

tell application "FileMaker Pro"

-- you'll have to stick yout own variable and FM field names in here

set JobDescription to cell "JobDescription" of current record

set JobStatus to cell "JobStatus" of current record

set MailSubject to cell "key" of current record

end tell

set the compression_setting to "No"

tell application "Microsoft Entourage"

activate

set MyMessage to make new outgoing message with properties

Link to comment
Share on other sites

  • 2 weeks later...

If I were doing this I wouldn't bother with AppleScript - I only did this one with AppleScript as the person asking wanted to pause the script and leave the message window open. I'd do the whole thing with Scriptmaker and loop it. In this example I use SetField to find records with a due date of tomorrow and send off the email - you'll have to substitute my field names etc for your own

Enter Find Mode

Set Field [ duedatedd, Day(Today+1) ]

Set Field [ duedatemm, Month(Today) ]

Set Field [ duedateyy, Year(Today) ]

Pause/Resume Script [ ]

Perform Find

[ Replace Found Set ]

Go to Record/Request/Page

[ First ]

Loop

Exit Loop If [ Status(CurrentFoundCount) = 0 ]

Set Field [ materialemailsent, Status(CurrentDate) ]

Send Mail [ To: email_field, Subject: email_subject_field, Message: email_message_field][ No dialog ]

Exit Loop If [ Status(CurrentFoundCount) = 0 ]

Go to Record/Request/Page [ First ]

Omit Record

End Loop

Show All Records

Link to comment
Share on other sites

Yep, basically all you have to do is replace the following line;

Send Mail [ To: email_field, Subject: email_subject_field, Message: email_message_field][ No dialog ]

with

Perform AppleScript

and then stick the following script in the AppleScript window;

on run

try

tell application "FileMaker Pro"

set emailaddress to cell "emailaddress" of current record

set JobDescription to cell "JobDescription" of current record

set JobStatus to cell "JobStatus" of current record

set MailSubject to cell "CombinedJobNumber" of current record

end tell

tell application "Microsoft Entourage"

set MyMessage to make new outgoing message with properties

Link to comment
Share on other sites

  • Newbies

One more question...

Since the subject and the message of my emails will not vary from record to record (or address to address), is it possible to send one mass email to my found set of addresses instead of sending individual emails?

Thanks so much for your help!!!

Link to comment
Share on other sites

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