Jump to content
Sign in to follow this  
Steve Nanz

Send Mail using Entourage

Recommended Posts

How do I use the Send Mail script so that the new mail message appears open instead of being placed in the drafts folder?

Thanks, Steve

Share this post


Link to post
Share on other sites

You could run it as an AppleScript from Scriptmaker - Entourage is extremely scriptable and you can specify exactly what you want it to do.

You can get some good scripts for examples from:

http://www.macscripter.net/

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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 ??? "me@myaddress.com"

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

Share this post


Link to post
Share on other sites

Can you tell me how I might modify that script in order to send e-mails to a found set of records as opposed to the current record? Thanks so much for your help!

brooke

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I really appreciate your help! The script is working perfectly... The only thing is, I would also like the script to pause in entourage before the email is sent. Any expert suggestions? Again thank you so much for your help.

brooke

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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!!!

Share this post


Link to post
Share on other sites

I can't see why not, but I don't know how to do it off the top of my head - there are quite a few threads in the forum on similar stuff that might help

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.