Automator to Batch Mail?

Hello,
I'd like to be able to select a large number of photos in finder then have automator send each one in a single email to an account. Is that possible?
Thanks

you can do it as follows
make the following workflow
1. get selected (or specified) finder items
2. run apple script
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #ADD8E6;
overflow: auto;"
title="this text can be pasted into the Script Editor">
on run {input, parameters}
tell application "Finder"
repeat with this_item in input
tell application "Mail"
activate
set NewOne to make new outgoing message with properties {subject:"whatever you want here", content:"and whatever you want here", visible:true}
tell NewOne
make new to recipient at end of to recipients with properties {address:"[email protected]"}
tell content of NewOne
make new attachment with properties {file name:this_item} at after last paragraph
end tell
end tell
send NewOne
end tell
end repeat
end tell
end run</pre>
modify the above as neede. If you want the whole process to happen in background remove visible:true form the script. also, you might want to insert a line
delay 5
before
end repeat
to allow Mail time to send. the delay is in seconds and can be adjusted.
Message was edited by: V.K.

Similar Messages

  • How do I set-up Automator to open Mail when I start up Mac OS X?

    How do I set-up Automator to open Mail when I start up Mac OS X? Provided that this is how I would do it.

    You don't need Automator.
    Just add Mail to the login items in SystemPreferences>Accounts
    or
    If Mail is on the Dock, Ctrl-click the icon and select 'Open at Login'

  • I need to send an automated birthday greetings mail notification

    hi all .. I have a requirement like.. I need to send an automated birthday greetings mail notification on every morning.. so I need a general code...for that
    so pls any one help me thank you in advance

    package notification;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.DataSource;
    public class Notification{
        /** Creates a new instance of Notification*/
        public Notification() {
        public static void main(String[] args) {
            try {
                String sql = "Select name, email from users where DATEDIFF(NOW(),birthday)=0)";
                Class.forName("com.mysql.jdbc.Driver").newInstance();
                Connection conn = DriverManager.getConnection(
                        "jdbc:mysql://localhost/birthday?user=java&password=javajava");
                Statement stmt = conn.createStatement();
                ResultSet rs = stmt.executeQuery(sql);
                while (rs.next()) {
                    String theText = "Congratulations "+rs.getString("name");
                     new BirthdayMail("smtprelay.myserver.net", rs.getString("email"), "[email protected]", "Automatic notification", theText, "Birthday");
            } catch (SQLException ex) { // handle the error
                System.out.println("SQLState: " + ex.getSQLState());
                System.out.println(
                        "VendorError: " + ex.getErrorCode() + " " + ex.getMessage());
            } catch (Exception ex) { // handle the error
                System.out.println("Non-sql exception: " + ex.getMessage());
                ex.printStackTrace();
    * BirthdayMail.java
    package notification;
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class BirthdayMail {
         * Main method to send a message given on the command line.
        public static void main(String args[]) {
            try {
                String smtpServer=args[0];
                String to=args[1];
                String from=args[2];
                String subject=args[3];
                String body=args[4];
                send(smtpServer, to, from, subject, body, "");
            } catch (Exception ex) {
                ex.printStackTrace();
            System.exit(0);
         * Constructor.
        public BirthdayMail(String s1, String s2, String s3, String s4, String s5, String s6) {
            try {
                String smtpServer=s1;
                String to=s2;
                String from=s3;
                String subject=s4;
                String body=s5;
                String personal = s6;
                send(smtpServer, to, from, subject, body, personal);
            } catch (Exception ex) {
                ex.printStackTrace();
         * "send" method to send the message.
        public static void send(String smtpServer, String to, String from
                , String subject, String body, String personal) {
            try {
                Properties props = System.getProperties();
                props.put("mail.smtp.host", smtpServer);
                Session session = Session.getDefaultInstance(props, null);
                // -- Create a new message --
                Message msg = new MimeMessage(session);
                // -- Set the FROM and TO fields --
                msg.setFrom(new InternetAddress(from, personal));
                msg.setRecipients(Message.RecipientType.TO,
                        InternetAddress.parse(to, false));           
                // -- Set the subject and body text --
                msg.setSubject(subject);
                //msg.setText(body);
                msg.setContent(body, "text/html");
                // -- Set some other header information --
                msg.setHeader("X-Mailer", "NotificationMail");
                msg.setSentDate(new Date());
                // -- Send the message --
                Transport.send(msg);
                //log.info("Message sent OK.");
            } catch (Exception ex) {
                ex.printStackTrace();
        public static boolean statusSend(String smtpServer, String to, String from
                , String subject, String body, String personal) {
            try {
                Properties props = System.getProperties();
                // -- Attaching to default Session, or we could start a new one --
                props.put("mail.smtp.host", smtpServer);
                Session session = Session.getDefaultInstance(props, null);
                // -- Create a new message --
                Message msg = new MimeMessage(session);
                // -- Set the FROM and TO fields --
                msg.setFrom(new InternetAddress(from, personal));
                msg.setRecipients(Message.RecipientType.TO,
                        InternetAddress.parse(to, false));
                // -- We could include CC recipients too --
                // if (cc != null)
                // msg.setRecipients(Message.RecipientType.CC
                // -- Set the subject and body text --
                msg.setSubject(subject);
                //msg.setText(body);
                msg.setContent(body, "text/html");
                // -- Set some other header information --
                msg.setHeader("X-Mailer", "NotificationMail");
                msg.setSentDate(new Date());
                // -- Send the message --
                Transport.send(msg);
                return true;
            } catch (MessagingException ex){
                log.error(ex.toString());
                return false;
            } catch (Exception ex){
                ex.printStackTrace();
                return false;
    }and in cron.daily a script to daily execute the project:
    #!/bin/sh
    /usr/local/jdk1.5.0_06/bin/java -jar /home/admin/proj/notification/Notification.jar
    exit 0

  • Get report of Automated jobs in mail

    Hi to all,
    How can I Get report of Automated jobs in mail.Like particular datafile is out of space.

    The easiest way is to setup OEM monitoring. There are plenty of tools out there that do the same job, but if you don't want to buy software then there are also plenty of places on the web where you can download Oracle monitoring scripts.
    I do not recommend downloading other people's scripts. If you write your own scripts to select from the data dictionary you will learn a lot about the database and about scripting.

  • Automated salutation in Mail "Hello To " as a shortcut?

    Hello,
    it would be nice to have a shortcut that types an automated salutation in Mail "Hello <To>" where <To> is the recipient of my mail. Is there an extension or can I get "Typinator" or "TextExpander" to do this?
    Regards,
    Metuschelach

    In Thunderbird there is an extension named Quicktext that is able to do that.

  • Automation of Batch session

    Hi Guys,
    One SAP standard program (SAPF120) creating the batch session in SM35, i need to automation the session, Could you please provide step by step process to automation the batch session.
    Thanks
    Gourisankar

    Hi,
    Thanks for inputs...
    when i exected the program "RSBDCSUB", it is asking the program below things
    Session           "SAPF120   "                                                 
    Created on                                            
      From               Today Date                                   
      To                    31-12-9999.
    Will these inputs sufficient, do i need to provide more info.
    Thanks,
    Gourisankar.

  • Automated execution and mailing of BeX reports

    Hi,
    I have a requirement which goes like this:
    There is a report which gives a P&L statement for a cost center. Say I have one parent Cost Center Group and there are 100 Cost Centers within that group. The report allows the user to select variants based on the cost center. So they have to execute this report every month for 100 different cost centers in order to generate a P&L for each cost center.
    Now the users want some sort of automated way to execute the reports every month for each cost center within a cost center group and then the results (XL based) delivered to them through email. The mail should contain workbooks or BeX reports.
    Is it possible to implement this? If yes then how can this be achieved?
    We are running BW 3.5.
    Thanks in advance,
    Regards,
    Nikhil

    Hi Arun,
    Do you have some document on how to use the RSCRM_BAPI transaction?
    everytime I try to run an extract it generates an error "No authorization to create extract /BIC/0CYYNIKTEST of type Table"
    and when I try to execute the query - it generates an OLAP error in a key figure.
    The query is quite complexin the sense that it uses structures in both the rows & columns sections and also uses all possible types of variables and also hs built in variants already.
    I would be grateful if you can send across some document on the transaction. I would have posted docs & screenshots of the query, but there is no way in SDn to do that.
    Thanks & regards,
    Nikhil

  • Can anyone help with Automator/Scripts with Mail Items

    I have a set up a smart folder in mail and it shows about 100 emails. These vary in content, addresses and recipients. The emails also have an extended threads.
    I need to generate a report with the emails (including threads) by subject time, date. etc.
    It will need to analyse the From: To: Date: Time: Subject: for each of the top email and also (all the threads within each email).
    How could Automator be scripted to do such a task. Manually it will be very time consuming and difficult.
    1. I am a newbee to automator and scripting is this likely to be beyond me?
    2. Are there any good sources of scripts available on the web which could be adapted?
    3. What is the recommended reading for writing, applying and using Scripting?
    iMac G5 Mac OS X (10.4.6) Airport Extreme; PalmT5
    iMac G5   Mac OS X (10.4.6)   Airport Extreme; PalmT5

    Thank you for taking the time to reply. I was finally able to figue out what to do. So far today everything is fine.
    Most Sincerely,
    Glenda

  • Automation of batch number copy from RESB to AFPO using COR2/COR5

    Dear exports,
    As subject, I need to copy batch number from RESB-CHARG to AFPO-CHARG AUTOMATICALLY.
    I made enhancement in user exit ZXVBZU02. It works manually when click "create button" under tab "Goods recpt" in transaction COR2 after batch number determination (assign value to RESB-CHARG first).
    For automation, I'd like to do copy by either RELEASE (in COR2 or COR5) or SAVE (in COR2) this process order instead of clicking "create button".
    I found an BAdI WORKORDER_UPDATE, and put break-points in method AT_SAVE, AT_RELEASE, IN_UPDATE. But somehow it's NOT stopped.
    I think I may pick the wrong BADI, or no such solution.
    Your help is most welcome.
    Thanks alot.
    Steven
    Edited by: Steven Zhang on Oct 29, 2008 10:48 AM

    YES, badi is active. Also the break-point was placed in before_update (actually, I prefer at_release). It's bypass all those methods.
    Now I am suspecting whether this is the right BADI. From naming, it looks it is. But as we knew there is a tool (useful report), it can report all enhancements (including user exit and BADI) according to transaction. The badi WORKORDER_UPDATE is not listed in both COR2 and COR5.
    How? pls throw a light on this.:(
    By the way, I'm using ECC6.
    rgds,
    Steven

  • Automator w/ Group Mailer Truncating Messages

    I am attempting to send out an email to every person in my Address Book who has an email. I created a smart group in Address Book and am using that to send my messages. I am going to be getting married and I would like to announce the dates when those are set. I am also having a child and would love to email everyone when it's time.
    I can get the people I need to get. The problem is the mail message gets shorter and shorter every time a new message is created eg:
    To:[email protected]
    Body: "Hey guess what.... Blah Blah Blah"
    To:[email protected]
    Body: " guess what.... Blah Blah Blah"
    To:[email protected]
    Body:" lah Blah"
    My workflow looks like this:
    1. New Message
    2. Find People whose group = has email
    3. Group Mailer
    4. Send Message

    Not sure why you would need to use Automator. Why not just send a single email out using the group as the addressee and hide the addresses?
    To send emails to a group and hide group member names and addresses when sending a message to a group created in Address Book do the following.
    1. Open Mail and choose Preferences from the Mail menu.
    2. Click Composing.
    3. Deselect the checkbox for "When sending to a group, show all member addresses" and close Mail Preferences.
    Then when you send an email to a group, only the group name will be seen.

  • Using Automator Workflows in Mail

    Hi there,
    just created an Automator workflow to filter received emails from a specific sender and subsequently saves the attachement to a folder... I set up a rule in mail that 2 days after receipt of an email form the sender runs the workflow:
    Unfortunately it does not work - any thoughts????
    Thanks
    Dominic

    nobody any idea...?

  • Some automated actions with Mail

    Hello,
    I started a new post because the topic is now about Mail.app.
    (Advice from Camelot, it's better to use mail for this kind of automation)
    I will use a mail rule to selected the mail with subject. and attach a applescript for those emails with that subject.
    So the attached applescript should do this:
    1 print the email - always the same printer
    2 save the attachments to always the same directory.
    That's it.
    Any help would be appreciated !
    This is what I found For mail and attachments but don't know how to start doing this.
    mail attachment n [inh. item] : A file attached to a received message.
    elements
    contained by messages.
    properties
    name (string, r/o) : Name of the attachment
    MIME type (string, r/o) : MIME type of the attachment E.g. text/plain.
    file size (integer, r/o) : Approximate size in bytes.
    downloaded (boolean, r/o) : Indicates whether the attachment has been downloaded.
    id (string, r/o) : The unique identifier of the attachment.
    Print command in mail :
    print v : Print an object.
    print reference : list of objects to print
    -----

    First : I'm trying to save the Mail attachments now.
    I found this information on MacTech.
    I have a mail action that should trigger this script. But nothing happens.
    Try running it without the perform mail action it stops at the item 1 part.
    on performmailaction(theData)
    set theOutputFolder to ("Macintosh HD:Users:gast:Documents:vis:") as string
    tell application "Mail"
    set theMessages to selection
    set theMessage to item 1 of theMessages
    set theAttachments to every attachment of content of theMessage
    repeat with a from 1 to length of theAttachments
    set theAttachment to item a of theAttachments
    try
    set theAttachmentName to name of theAttachment
    set theSavePath to theOutputFolder & theAttachmentName
    save theAttachment in theSavePath
    end try
    end repeat
    end tell
    end performmailaction
    -----------------------------------------------------------

  • Automator Workflow for Mail Printing?????

    How can I print out all all mail (250 emails) in a single mailbox into a single file, which I can save as a PDF?
    I looked even for an Automator workflow that would
    Print; Preview: Save As
    so that I would then have a serires of PDFs that I could then import all the individual PDF pages in to Acrobat to create a single document, but Automator does not have these options.
    Any thougt would be very helpful. Thanks!!
      Mac OS X (10.4.2)  

    I don't believe you can do it the first way.
    However there are at least three ways to do it the second way.
    1) Use System Events GUI scripting exclusively to drive the user interface i.e., selecting menu items and pushing buttons;
    2) Use some of 1) along with Mail's AppleScripting capabilities. GUI scripting would still be needed for Preview as it does not have AppleScript capabilities;
    3) Install the cups-pdf solution called "Virtual Printer" (http://www.macupdate.com/info.php/id/20219) that allows one to create pdf files from anything that can be printed using the print dialog. This would also have to be driven using one or both of GUI scripting and Applescript.
    If you do a lot of PDF printing then I would recommend 3) and generally 1) is less robust than 2). Myself or others on this forum should be able to help with whichever solution you prefer.

  • FCS for automating compressor batches and thumnail creation

    Hello,
    We're in the process of putting our video archive online, and I've been tasked with finding the best way to encode all the media we need.
    I've found a workflow that's clunky, but it works using FCP and Compressor. My question really, is can I do all of this in Final Cut Server, and better still - will it speed things up?
    _*Existing workflow*_
    The starting point is a set of clips, a hundred or so per tape, that are ready and exported from Final Cut as DV files.
    1. Create compressor presets with watermark, timecode reader, and text overlay with tape number.
    2. Repeat for both flash versions and a quicktime at full DV.
    3. Stick the media into compressor and apply presets, then submit.
    4. Upon completion, stick the new DV through Sorenson Squeeze.
    5. Using Automator and some quicktime actions, get the first frame of every clip and save as jpeg for thumbnails.
    6. Batch resize all these thumbnails in photoshop.
    7. Upload all files to site via FTP.
    That's pretty much it. So my questions are:
    1. If I set up all my compressor presets, can I bring these into FCS?
    2. Does it support flash?
    3. Can I use watch folders to automate any of this?
    4. Will it submit these various things to a compressor cluster?
    5. Can it make thumbnail images of the files (this would be hugely advantageous, as the current system is so clunky)
    6. Does FCS include Compressor?
    7. I'm looking at buying a machine to get all these encodes done faster. Should I spend more on RAM or processor for faster compression? I'm under the impression that it's more processor intensive.
    Any help in any of these areas would be much appreciated!
    Best,
    Ben

    re 1: Yes, you can use your compressor presets in FCS.
    re 2: No, FCS/Compressor does not natively support Flash. However, there is a slick add-on for Compressor called Episode (http://www.telestream.net/products/episode_series.htm) that will allow you to encode Flash (and Windows media, and 4:2:2 Mpeg2, etc) using Compressor.
    re 3: Yes, you can use watch folders to automate the compression, ftp upload, and thumbnail generation.
    re 4: Yes, FCS supports clusters.
    re 5: see re 3:
    re 6: Yes, FCS includes Compressor.
    re 7: If only a few people are going to connect to FCS simultaneously, spend the money on the processors. If a bunch of people will be connected at the same time, you may want to look into more RAM and a fast hard drive configuration.

  • Automator / Applescript Batch export

    Is it possible to create automator actions or applescript that will batch export a folder of keynote documents to .mov files?

    No you can't batch them all at once because Quicktime is used for rendering the slideshow and it's a one at a time operation. It might be done with Applescript but you'd have to ask over in the Applescript forum for help with that.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

Maybe you are looking for

  • Jsp's deployment in 9i AS 2.0.0.1rc

    I have developed a website in jsps and mysql datbase,in this i had 3 beans for databse connectivity,user and administration ,now i want to use 9i 2.0.0.1rc datbase and Oracle 9i Application server for this,could any one help me where to place these j

  • Having problem adding citations using endnote with pages 4

    Help needed When I go to insert and find a quote in my endnote library and hit insert it appears as if it has done something but no quote appears in my pages document however something is in there because it moves the curser along and when I press de

  • Adding custom fields to ALV of Delivery View of ME2M Report

    Dear all, I want to copy ME2M and create a new report and add 2 fields to ALV fetching it from Z-Table. I am not able to make out how the Field Catlog is built and How values are passed to ALV from IT. The complete code is complex OO ABAP and we have

  • G60-231wm Windows Vista 32-bit Recovery error

    I need to order a new Recovery CD for the operating system. Your website does not list any CD for Windows Vista 32-bit OS. How can I Restore this notebook? It has no burned backup CDs and the partition for recovery has an error. It tried everything t

  • How to recognize vitual keyboard is visible (iPAQ 3955)

    I'm running a java application on the iPAQ 3955 PDA, with Jeode runtime. I have a need to recognize (from the java app) when the virtual keyboard has been elevated, so that I can collapse my application somewhat to accomodate the keyboard on the litt