Skip to Content

World of Warcraft patch 3.0.2 has launched! Get the latest on the game at WoW Insider.
AOL Tech

Posts with tag attachments

Filed under: Terminal Tips

Terminal tip: easy email attachments

If you're looking to automate the sending of emails with attachments quickly and easily (and aren't too concerned with having some glamorous stationery), Terminal is once again your friend. It's possible with Mail.app and AppleScript, but there are a few pitfalls and, for most purposes, a simple shell command will do the trick:

(echo "This is the message body";uuencode Desktop/yourDoc.doc yourDoc.doc)|mail -s "Test attachment" someone@adomain.com

The magical command in this one is uuencode, which is used to encode and decode binary files and can be used on just about any file type. The two arguments in the command above define the name and location of the source file and the name the file should have when it's received. The parenthetical statement at the beginning combines the results of the echo and uuencode commands which are then piped (|) to the mail command. The mail command, having received the body text and attachment, is told to append a subject (-s "Subject") and send it to the address specified. If you wanted to send a longer text file – with line breaks, perhaps – as the body, you could save the text in an external file and replace the echo statement with cat myfile.txt.

By adding a little complexity you could make a shell script that takes arguments, making the automation a little more flexible. But TUAW reader Adam was wondering how to send a photo he'd taken automatically using AppleScript (triggered by a Mail Rule). So here's an AppleScript implementation that doesn't require opening Terminal or dealing with Mail.app scripting:

set msgBody to "This is the body of the message"
set msgSubj to "Message subject"
set mailDest to "someone@adomain.com"
do shell script "(echo '" & msgBody & "'; uuencode /Users/you/Desktop/pictosend.jpg pictosend.jpg) | mail -s '" & msgSubj & "' " & mailDest

Make sure you remove any line breaks from that last line. This obviously requires a predetermined image name, but that could be made a variable as well and used as part of a larger script. We hope this helps, Adam!

Filed under: How-tos, Odds and ends

Mail attachment reminder saves embarassment

mail attachment messageI've done it again -- sent an email that mentions an attachment, and then forgot to attach the file. It's always embarassing. Here's a way to save yourself from similar humiliation.

Download this free Attachment Scanner plugin for Mail.app, and install it following the directions on the developer's site. Now when you type "attach," "attachment,", "attaching," or similar words in an email, if you hit Send without actually attaching a document, you'll see a warning like this one: "Message Has No Attachment. Your mail appears to refer to an attachment, but none exists. Do you wish to continue?" If you don't mention an attachment, you won't see anything different than usual. I've been using it all day, and really appreciate getting a second chance to save face thanks to developer James Eagan.

[via macosxhints]

Filed under: iLife, Software, Internet Tools, Reviews

Review: iWeb's enhancements are exactly what it needed

In the most recent iLife '06 software update that Damien mentioned, iWeb understandably received the largest bump of new features and bug fixes; after all, it is the latest to arrive at the iLife party. Considering that I've been pretty vocal about my gripes with this otherwise fantastic addition to both iLife and .Mac, you can imagine my enthusiasm for Software Update to work its magic asap.

After tinkering with the new features in iWeb 1.1 like blog comments and drop-dead simple photo album page creation, I thought I'd post a quick review of what's new, as I think iWeb is finally starting to fit into its role of a strong, WYSIWYG 1.0 application from Apple.

Continue readingReview: iWeb's enhancements are exactly what it needed

Filed under: Software, Cool tools, Productivity

Make iCal automatically email people at a specific time

I've been on a productivity kick ever since I found that kGTD plugin for OmniOutliner, and I thought this script/app would be a nice addition to the collection of anyone who works in a collaborative environment, especially for those who live and die by email or just can't seem to remember to do X at X o'clock.

iCalMail 1.3 sets up a new calendar into which you can add events that will automatically email anyone you want at the event's time. iCalMail is clever too, allowing you to use different fields of the iCal event to compose each email, and the breakdown works like this:
  • event name -> subject
  • location -> attachment 
  • attendees -> recipients 
  • notes field -> message text
I haven't tested this yet, but it seems like a great idea, especially since there is a method for including attachments. Check out the script at ScriptBuilders, as well as more information at Chris J. Shull's site.

Tip of the Day

When viewing folders using icon view or list view, both Command-Up-arrow and Command-Down-arrow play a special role. Command-Up-arrow moves you up to the parent folder of the currently-displayed folder.


Follow us on Twitter!

Sponsored Links

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Podcaster
Apple Vanity Plates
Apple booth Macworld 07
DiscPainter
Crash Bandicoot Nitro Kart 3D
Macworld Expo 2007 show floor
Apple Texas Hold 'Em
The Macworld Faithful in Line
iPhone First Look
Facebook 2 for iPhone
Best Buy Express selling iPods at LAX
Jack-o-Lantern Screensaver
Ten Fun and Free iPhone apps
Take a stroll down memory lane
First Look: SousChef for Mac
First Look: Grocery iQ for iPhone
Pixelmator 1.3
Earthscape

 

More Apple Analysis