Mailsmith
Other Programs
Scripts
Mailsmith.scpt
Archive to sub-mailbox
Check Spelling
Find reply
Change font size
Submit Script to JEM
Fix common spelling errors
Setting SMTP server
URL from Safari
Address from AB
linkMunge
Export to Address Book
Saving attachments
Digest Script
File with same
POP window position
Position of new windows
iCal and Mailsmith
Edit From Line
Modified Thread Script
Reply to Selection
Temporary Text Window
Compact gain
Tracking backups
Edit subject
Googler
Auto-rewrap
MMA
SMTP server
Open, fetch, and close
URL Manager
BrainForest
Thread by Author
Thread by subject
Export Email
Get Selection
Read Addresses
Export Email
Organize Email
Account setup
Mailsmith 2 BBEdit
BBEdit 2 Mailsmith
Search II
Check One
Delete Enclosure
Open, fetch, close
Set Answered
Set Redirected
Empty Trash
List found
Print Several
Del. old. msg.
Delete Enclosures
Accounts
Address Book
Editing
Filters
General
Import/Export
Links
Mailboxes
Memory
Scripting
Speed
send/receive
Tips/Tricks


Mailsmith.scpt (for sending email from iPhoto)

Author Charlie Garrison
Last modified 2003-06-09
What is this?

iPhoto - Send photos via email script Adapted for use with Mailsmith by Charlie Garrison; 2003-06-04

The script need to be named "Mailsmith.scpt" and it needs to be copied to two locations in iPhoto package: Contents/Resources/ Contents/Resources/Scripts/

The attached "Mailsmith.tif" image should also be copied to both the above directories.

After copying files into iPhoto package, open iPhoto and select Preferences. You should find a new option in the 'Mail' menu for 'Mailsmith'. Change the 'Mail' preference to 'Mailsmith'. Close Preferences.

Clicking the Email button will now use Mailsmith to send emails.

The script modification was inspired by a similar modification for sending email notices from iCal. I don't remember who wrote that script mod (so I can't give proper credit).

Here is the Mailsmith icon: Mailsmith


-- Mailsmith.applescript
-- Scope

-- Copyright (c) 2002 Apple Computer. All rights reserved.
-- Adapted for use with Mailsmith by Charlie Garrison; 2003-06-04

on mail_images(email_subject, default_address, image_count, new_files, new_captions, new_comments, cancel_string)
    
    try
        tell application "Mailsmith"
            activate
            set the new_message to make new message window
            tell new_message
                set the subject to email_subject
                if image_count is 0 then
                    set the comments to new_captions
                else
                    set the comments to return & return & return & return
                end if
                repeat with image_idx from 1 to image_count
                    set this_caption to item image_idx of new_captions
                    set this_comment to item image_idx of new_comments
                    set the comments to the comments & this_caption & return & this_comment & return & return & return
                end repeat
                set the contents to comments
                repeat with image_idx from 1 to image_count
                    set this_imagefile to item image_idx of new_files
                    set this_caption to item image_idx of new_captions
                    set this_comment to item image_idx of new_comments
                    set the comments to this_caption & return & this_comment
                    make new enclosure at end with properties {file:this_imagefile}
                end repeat
            end tell
        end tell
        
    on error error_message number error_number
        log error_message & " " & error_number
        if the error_number is not -128 then
            tell application "Finder"
                beep
                display dialog error_message buttons {cancel_string} default button 1
            end tell
        end if
    end try
    
end mail_images

property ASDScriptUniqueIdentifier : "Mailsmith.applescript"