Mail; Using applescript to create an auto-reply with attachments

I know nothing about applescript and so have no clue how to do this. I tried googling a script but couldn't find one. I also saw similar posts on this topic, but couldn't find scripts.
I am looking for a simple applescript to go into the Mail app rules to reply with an email message with an image attachment. does anyone know where I can find that script? again, I know nothing about applescript, so I cant do it myself, so details would be nice.
thanks!

ok no one replied. now i am wondering, how can i get automator to maybe add an attachment to a current outgoing message. i saw an option for that in automator, but it only works if you have automator create a new email message which i dont want. im using mailtemplate to reply to email messages and quickeysx too, so what i need is to add an automator script to just add an attachement (or 2) to the current outgoing email message. or maybe there is an apple script to add attachment to the mail message on screen? any help would be great thanks

Similar Messages

  • How do I create an auto reply for one person in my buddy list?

    I want to be able to have an automatic reply to one person in my buddy list whenever they IM me so that i dont have to reply myself. I dont want to block them but i sometimes want to be able to just avoid them and so does anyone know any applescript that i can run whenever they send me a message??

    Hi,
    In the Buddy List highlight a Buddy.
    Use the CMD and I keys together (Get Info)
    This brings up their Info Card.
    Select Actions  (Same as Alerts in the Preferences In Fact some versions do Read  "Alerts" )
    Change the top item to Invite (Text)
    Select the AppleScript option.
    Set the Script to be Auto-Decline.
    This will produce no response on the Buddies end.
    For that go to the General Section of the Preferences and set  the option to "Auto-Reply with my Away Message"
    This will then send the Away message to the Buddy set in the first bit but to no--one else.
    If you wish to be able to Reply when you have an Available Message up, that is a little more difficult.
    9:19 PM      Thursday; September 29, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • When I forward mail (using iPhone) to other, the recipient replied the picture become a link.

    When I forward mail (using iPhone) to other, the recipient replied the picture insides mail content become a link. Of course, they can click on the link and it goes to the picture. Please help.

    From the menu bar select '''View-Headers-Normal'''

  • Cannot get new messages to download automatically and auto reply with out of office message have to manually check for new messages to get it to do this

    I am using Mozilla Thunderbird 31.3.0. I know how to create a message filter to set up an auto reply message, but cannot get Mozilla to automatically download new message and auto reply with the message in the filter unless I manually check for new messages, that is the only way to make it work. I have looked online and can't seem to find an answer to this particular issue. According to anything that I have found, I have the correct boxes checked in server settings: check for new messages at startup, automatically check for new messages, check for new messages every x amount of minutes. It's one thing to have to leave my computer on and Thunderbird open to make this work, but to have to manually check for new messages to get the auto response to work defeats the whole purpose of having an auto reply, as I use them for vacations, holidays, etc. I have wondered if there are any security settings that are causing this issue, but if so, I don't know what changes to make to them. Thanks in advance for any help. This is driving me crazy.

    I do find it a bit odd that Thunderbird is not getting mail on schedule, perhaps you have an add-on or anti virus program that prevents that.
    Holding shift while you start Thunderbird will start with add-ons disabled to check if mail come automatically.
    Airmail is right though, use Verizons auto responder. This link might help with that http://www.verizon.com/support/residential/internet/highspeed/account+tools/email+tools/questionsone/85621.htm#
    You say that not having such a setting in Thunderbird is something that needs fixing. This idea comes on the whole because Outlook has such an option. what most people are not aware of it only works with Exchange server. There is no "vacation response" in server mail specifications so every server implements it differently.
    Just as all cars have a radiator, you can not take any radiator and just put it in, they are subtly different even though they perform the same purpose. Same goes for the various vacation responders, They perform the same purpose but they differ between email server software brands.
    Thunderbird leaves it to the server end to expose the functionality, as they are really the only ones who understand what they did. Outlook exposes the option and mostly greys it out.

  • How can i send an auto reply with form content to sender?

    Hai!
    I'm new to website building, but i already came a long way
    i made a form and i like to send a auto reply with the form content (if that isnt too difficult) to the person who filled it in.
    The form i made is in PHP (coding i copied partly from someone from the internet .)
    You can see the from at: http://vinddit.nl/vindditnu%20php%20version.php
    My PHP coding so far
    <?php
    // Set email variables
    $email_to = '[email protected]';
    $email_subject = 'Aanvraag - VINDDIT NU!';
    // Set required fields
    $required_fields = array('Voornaam','email','Achternaam','Plaats');
    // set error messages
    $error_messages = array(
              'Voornaam' => 'Vul hier uw voornaam in a.u.b.',
              'email' => 'Vul hier een geldig email adres in a.u.b.',
              'Achternaam' => 'Vul hier uw achternaam in a.u.b.',
              'Plaats' => 'Vul hier uw woonplaats in a.u.b.'
    // Set form status
    $form_complete = FALSE;
    // configure validation array
    $validation = array();
    // check form submittal
    if(!empty($_POST)) {
              // Sanitise POST array
              foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value));
              // Loop into required fields and make sure they match our needs
              foreach($required_fields as $field) {
                        // the field has been submitted?
                        if(!array_key_exists($field, $_POST)) array_push($validation, $field);
                        // check there is information in the field?
                        if($_POST[$field] == '') array_push($validation, $field);
                        // validate the email address supplied
                        if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field);
              // basic validation result
              if(count($validation) == 0) {
                        // Prepare our content string
                        $email_content = 'New Website Comment: ' . "\n\n";
                        // simple email content
                        foreach($_POST as $key => $value) {
                                  if($key != 'submit') $email_content .= $key . ': ' . $value . "\n";
                        // if validation passed ok then send the email
                        mail($email_to, $email_subject, $email_content);
                        // Update form switch
                        $form_complete = TRUE;
    function validate_email_address($email = FALSE) {
              return (preg_match('/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i', $email))? TRUE : FALSE;
    function remove_email_injection($field = FALSE) {
       return (str_ireplace(array("\r", "\n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field));
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
              <title>Aanvraag formulier</title>
              <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
              <link href="style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.0/mootools-yui-compressed.js"></script>
        <script type="text/javascript" src="validation/validation.js"></script>
              <script type="text/javascript">
    var nameError = '<?php echo $error_messages['fullname']; ?>';
                        var emailError = '<?php echo $error_messages['email']; ?>';
                        var commentError = '<?php echo $error_messages['comment']; ?>';
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
        </script>
    <style type="text/css">
    </style>
    </head>
    <body onload="MM_preloadImages('icons/x.png')">
    <p> </p>
    <p>
      <?php if($form_complete === FALSE): ?>
    </p>
        <form action="vindditnu php version.php" method="post" enctype="application/x-www-form-urlencoded" name="Form"  id="commentsform">
        <h1><img src="icons/vinddit3.gif" width="220" height="80" alt="logo" /></h1>
        <h1>Wat zoekt u?:</h1>
                     <table width="690" border="0">
            <tr>
              <td>In welke categorie zoekt u?*</td>
              <td colspan="3"><select name="Ophalen_verzenden" id="Ophalen_verzenden">
                <option selected="selected">Meubels </option>
                <option>Witgoed </option>
                <option>Woon accesoires </option>
                <option>Kleding </option>
                <option>Schoenen </option>
                <option>Mode accesoires </option>
                <option>Speelgoed </option>
                <option>Boeken, tijdschriften, papierwaren </option>
                <option>Overig </option>
              </select></td>
            </tr>
            <tr>
              <td>Kleur:* </td>
              <td colspan="3"><select name="kleuren" id="kleuren">
                <option>Blauw</option>
                <option>Rood</option>
                <option>WIt</option>
                <option>Zwart</option>
                <option>Beige</option>
                <option>Bruin</option>
                <option>Geel</option>
                <option>Oranje</option>
                <option>Rood</option>
                <option>Metallic (Bijv. Zilver/Goud/Brons/Koper</option>
                <option>Meerkleurig</option>
                <option selected="selected">Overig/ N.v.t</option>
              </select></td>
            </tr>
            <tr>
              <td>Merk: </td>
              <td colspan="3"><input name="Merk" type="text" id="Merk5" value="<?php echo isset($_POST['Merk'])? $_POST['Merk'] : ''; ?>" />
                <?php if(in_array('Merk', $validation)): ?>
                <span class="error"><?php echo $error_messages['Merk']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Type/Model:</td>
              <td colspan="3"><input type="text" name="type" id="type" value="<?php echo isset($_POST['type'])? $_POST['type'] : ''; ?>" />
                <?php if(in_array('type', $validation)): ?>
                <span class="error"><?php echo $error_messages['type']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Materiaal: </td>
              <td colspan="3"><input name="Materiaal" type="text" id="Materiaal" value="<?php echo isset($_POST['Materiaal'])? $_POST['Materiaal'] : ''; ?>" />
                <?php if(in_array('Materiaal', $validation)): ?>
                <span class="error"><?php echo $error_messages['Materiaal']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Maat: </td>
              <td colspan="3"><input type="text" name="Maat" id="Maat" value="<?php echo isset($_POST['Maat'])? $_POST['Maat'] : ''; ?>" />
                <?php if(in_array('Maat', $validation)): ?>
                <span class="error"><?php echo $error_messages['Maat']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Conditie*:</td>
              <td colspan="3"><select name="conditie" id="conditie" >
                <option>Zo goed als nieuw</option>
                <option>Nieuw</option>
                <option>Bebruikt</option>
                <option selected="selected">Geen voorkeur </option>
              </select></td>
            </tr>
            <tr>
              <td>Ophalen/Verzenden:*</td>
              <td colspan="3"><select name="ophalen" id="ophalen">
                <option>Ophalen</option>
                <option>Verzenden</option>
                <option>N.v.t</option>
                <option>Geen voorkeur </option>
              </select></td>
            </tr>
            <tr>
              <td>Prijs Min:</td>
              <td><input name="prijsmin" type="text" id="prijsmin" size="10" value="<?php echo isset($_POST['prijsmin'])? $_POST['prijsmin'] : ''; ?>" />
                <?php if(in_array('prijsmin', $validation)): ?>
                <span class="error"><?php echo $error_messages['prijsmin']; ?></span>
                <?php endif; ?></td>
              <td>Prijs Max:</td>
              <td><input name="Prijs" type="text" id="Prijs" size="10" value="<?php echo isset($_POST['Prijs'])? $_POST['Prijs'] : ''; ?>" />
                <?php if(in_array('Prijs', $validation)): ?>
                <span class="error"><?php echo $error_messages['Prijs']; ?></span>
                <?php endif; ?></td>
            </tr>
          </table>
          <h1>Opmerkingen:</h1>
          <table width="690" border="0">
            <tr>
              <td height="25">Opmerkingen:</td>
              <td rowspan="2"><textarea name="Opmerkingen" cols="67" rows="10" id="Opmerkingen"><?php echo isset($_POST['Opmerkingen'])? $_POST['Opmerkingen'] : ''; ?></textarea>
                <?php if(in_array('Opmerkingen', $validation)): ?>
                <span class="error"><?php echo $error_messages['Opmerkingen']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td height="78"> </td>
            </tr>
          </table>
          <h1>Uw Gegevens:</h1>
          <table width="690" border="0">
            <tr>
              <td>Voornaam/Voorletters*:</td>
              <td><input type="text" name="Voornaam" id="Voornaam" class='invul' value="<?php echo isset($_POST['Voornaam'])? $_POST['Voornaam'] : ''; ?>" />
                <?php if(in_array('Voornaam', $validation)): ?>
                <span class="error"><?php echo $error_messages['Voornaam']; ?></span>
                <?php endif; ?></td>
              <td>Achternaam:* </td>
              <td><input type="text" name="Achternaam" id="Achternaam" class='invul' value="<?php echo isset($_POST['Achternaam'])? $_POST['Achternaam'] : ''; ?>" />
                <?php if(in_array('Achternaam', $validation)): ?>
                <span class="error"><?php echo $error_messages['Achternaam']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Straatnaam:</td>
              <td><input type="text" name="Straat" id="Straat" class='invul' value="<?php echo isset($_POST['Straat'])? $_POST['Straat'] : ''; ?>" />
                <?php if(in_array('Straat', $validation)): ?>
                <span class="error"><?php echo $error_messages['Straat']; ?></span>
                <?php endif; ?></td>
              <td>Huisnummer:</td>
              <td><input name="Huisnummer" type="text" id="Huisnummer" class='invul' size="10" value="<?php echo isset($_POST['Huisnummer'])? $_POST['Huisnummer'] : ''; ?>" />
                <?php if(in_array('Huisnummer', $validation)): ?>
                <span class="error"><?php echo $error_messages['Huisnummer']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Postcode:</td>
              <td><input type="text" name="Postcode" id="Postcode" class='invul' value="<?php echo isset($_POST['Postcode'])? $_POST['Postcode'] : ''; ?>" />
                <?php if(in_array('Postcode', $validation)): ?>
                <span class="error"><?php echo $error_messages['Postcode']; ?></span>
                <?php endif; ?></td>
              <td>Plaats:* </td>
              <td><input type="text" name="Plaats" id="Plaats" class='invul' value="<?php echo isset($_POST['Plaats'])? $_POST['Plaats'] : ''; ?>" />
                <?php if(in_array('Plaats', $validation)): ?>
                <span class="error"><?php echo $error_messages['Plaats']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Email Adres:*</td>
              <td colspan="3"><input type="text" name="email" id="email" class='invul' value="<?php echo isset($_POST['email'])? $_POST['email'] : ''; ?>" />
                <?php if(in_array('email', $validation)): ?>
                <span class="error"><?php echo $error_messages['email']; ?></span>
                <?php endif; ?></td>
            </tr>
            <tr>
              <td>Telefoonnummer:</td>
              <td colspan="3"><input name="Telefoon" type="text" id="Telefoon" class='invul' value="<?php echo isset($_POST['Telefoon'])? $_POST['Telefoon'] : ''; ?>" />
                <?php if(in_array('Telefoon', $validation)): ?>
                <span class="error"><?php echo $error_messages['Telefoon']; ?></span>
                <?php endif; ?></td>
            </tr>
          </table>
          <p>
            <label for="Straat"></label>
            <label for="Huisnummer"><br />
            </label>
            <input type="submit" name="Submit" id="Submit" value="Verstuur" />
                   <input type="reset" name="Reset" id="Reset" value="Wissen" />
          </p>
        </form>
        <?php else: ?>
        <div class="bedankt">
          <p>Bedankt voor uw aanvraag!</p>
          <p>Wij zullen uw aanvraag zo spoedig mogelijk behandelen. Meestal duurt dit 2 a 3 werkdagen.</p>
          <p><img src="icons/vinddit3.gif" width="220" height="80" alt="logo" /></p>
    </div>
        <p>
          <script type='text/javascript'>
    setTimeout("ourRedirect()", 5000)
    function ourRedirect() {
          </script>
          <?php endif; ?>
    </body>
    </html>
    and .JS
    window.addEvent('domready', function() {
              // Get the form
              var form = $('comments_form');
              //  if the form is found...
              if (form) {
                        // obtain error fields
                        var name = $('fullname');
                        var email = $('email');
                        var comment = $('comment');
                        // Set the default status
                        var isValid = true;
                        // input error function for the error messages
                        var addError = function (field, msg) {
                                  field.addClass('error'); // Add error class to field
                                  var error = field.getParent().getElement('span') || new Element('span', {'class': 'error'}); // add error message if not already placed
                                  error.set('text', msg); // error text msg
                                  error.inject(field, 'after'); // Insert error message after field
      // detach error function used to delete any error messages and remove the error class
                        var removeError = function (field) {
                                  field.removeClass('error'); // Remove error class from form fields
                                  var error = field.getParent().getElement('span'); // find any existing error messages
      // destroy if error message
                                  if (error) {
                                            error.destroy();
    //  insert submit form event
                        form.addEvent('submit', function (e) {
                                  // Test name length
                                  if (name.get('value').length === 0) {
                                            isValid = false;
                                            addError(name, nameError);
                                  } else {
                                            isValid = true;
                                            removeError(name);
    // check email length
                                  if (email.get('value').length === 0) {
                                            isValid = false;
                                            addError(email, emailError);
                                  // check email validity
                                  } else if (!email.get('value').test(/^([a-zA-Z0-9\+_\-]+)(\.[a-zA-Z0-9\+_\-]+)*@([a-zA-Z0-9\-]+\.)+ [a-zA-Z]{2,6}$/)) {
                                            isValid = false;
                                            addError(email, emailError);
                                  } else {
                                            isValid = true;
                                            removeError(email);
                    // check comment length
                                  if (comment.get('value').length === 0) {
                                            isValid = false;
                                            addError(comment, commentError);
                                  } else {
                                            isValid = true;
                                            removeError(comment);
                                  // If form invalid then stop event happening
                                  if (!isValid) {
                                            e.stop();

    lisavs12686 wrote:
    Whould it also be possible to send the sender the submited data (looking like the filled in form or so)?
    not really nessecary but whould be a nice  jextra
    You can but you would need to send it as an html email which is much more complicated.
    What you would do is build a page/table construction like below. You would need to use the php variables to echo out the information in the <td></td> cells (example below).
    $reply = $_POST['email'];
    $from = '[email protected]';
    $replysubject = "Auto-Reply: Website Name";
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= "From: $from\r\nReply-to: $reply";
    $replymessage = '
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Comments from Website</title>
    </head>
    <body>
    <table>
    <tr>
    <td bgcolor="#ffffff" style="font-family: verdana, arial, helvetica, sans-serif; font-size: 13px; padding: 10px 15px;">Name: </strong>'.$name.'
    </td>
    </tr>
    </table>
    </body>
    </html>';
    mail($reply, $replysubject, $replymessage, $headers);

  • Creating an auto-reply message by command line

    Hi,
    Is it possible to create a an auto-reply message by command line? Need to create one but I have the users password and don't want to reset his password.
    TIA,
    Henry

    Thanks Pterobyte.
    I guess I did not search far enough back to find this. I did have to google en example of script. I've posted it below for future reference.
    # This is a sample script for vacation rules.
    # Read the comments following the pound/hash to find out
    # what the script is doing.
    # Make sure the vacation extension is used.
    require "vacation";
    # Define the script as a vacation script
    vacation
    # Send the vacation response to any given sender only once
    # every seven days no matter how many messages are sent
    # from that sender.
    :days 7
    #For every message sent to these addresses
    :addresses ["[email protected]"]
    # Make a message with the following subject
    :subject "Out of Office Reply"
    # And make the body of the message the following
    "I'm out of the office for an extended period of time and will not have access to email. "
    # End of Script

  • Using AppleScript to create a text file, based on an OCR'd file's content

    Hey guys, I've got an interesting situation.
    I was wondering if there would be anyway to use something like AppleScript (or the like) to create a text document and fill it with information based on what is found in an already OCR'd file?
    For example: I have a paycheck stub. The stub contains the words "Gross Pay" and the value "$xxxx.xx" on one line. Using Hazel to identify paychecks (based upon filenames), could I then use something like AppleScript, to create a new text file, and then pull the text from the line that contains the word's "Gross Pay" and insert it into the text file's next line?
    Ex:
    March 26,2012      
    Gross Pay                   $xxxx.xx
    April 6,2012
    Gross Pay                   $xxxx.xx
    Kind of how TurboTax's iPhone app pulls text from an image, then uses the values to insert it into the app's appropriate fields?
    I know this may be a lot to ask, but any help is appreciated. Thanks!

    StevenD: FYI, I did NOT give you the one star rating. I would never do that!
    StevenD wrote:
    Ow. Someone is grumpy today.
    Well, this is an assignment, so it is probably homework.
    Why else would anyone give HIM such an assigment, after all he has no LabVIEW experience and the tutorials are too hard for him?
    This would make no sense unless all of it was just covered in class!
    This is not a free homework service with instant gratification.
    OK! Let's do it step by step. I assume you already have a VI with the digital indicators.
    "...but have no idea where to begin".
    open notepad.
    decide on a format, possibly one line per indicator.
    type the document.
    close notepad.
    open LabVIEW.
    Open the existing VI with all the indicators.
    (are you still following?)
    look at the diagram.
    Who made the program?
    Does the code make sense so far?
    Is it a statemachine or just a bunch of crisscrossed wires?
    Where do you want to add the file read?
    How should the file be read (after pressing a read button, at the start of the program ,etc.)
    See how far you get!
    Message Edited by altenbach on 06-24-2008 11:23 AM
    LabVIEW Champion . Do more with less code and in less time .

  • How to set stationery in Mail, using AppleScript

    Is there a way to automatically use specific stationery with Mail, from an AppleScript script?
    To the script below I would like to add an instruction which asigns stationery to the mail message, and so far I have not yet found a working way of doing it.
    on run {theSubject, theBody, theAttachment}
              tell application "Mail"
                        set newMessage to make new outgoing message with properties {visible:true, subject:theSubject, content:theBody & return & return}
                        tell content of newMessage
      make new attachment with properties {file name:theAttachment} at after the last paragraph
                        end tell
      activate
              end tell
    end run
    I found an Automator example which requires the installation of an action, but once installed, it does not work. (It must have worked in OSX 10.6, but it does not on Mountain Lion) Here: Automator: Examples
    Any ideas, anyone?
    Thanks, Oliver

    try this:
    tell application "Numbers"
              tell table 1 of sheet 1 of document 1
                        repeat with i from 1 to row count
                                  if value of cell 14 of row i is equal to renew_month then
                                            set address_to to value of cells of row i
                                  end if
                        end repeat
              end tell
    end tell

  • Use applescript to create itunes smart playlists

    hi
    is the subject possible?
    my setup uses an intricate system of smart playlists building other smart playlists. when i add a new "theme", as i call it, like "party", "chart", "sad", "happy", etc, i dont want to have to go back through and create dozens of smart playlists each time... that is a job for my friend, applescript!
    regards
    jingo_man

    I am also interested in an answer on this. I'm not an AppleScript guru but I'm learning. My goal is to create a Smart Playlist with two criteria -- one is that the tracks exist in a specific other Smart Playlist and the other is that the track's play count is less than the average play count of all tracks in the other playlist.
    I have already managed to use AppleScript to find the average play count of all tracks in a selected Smart Playlist, I just don't yet know how to use that to automatically generate a second Smart Playlist.

  • Changing "from" in mail using applescript

    I am trying to send a notification email from script when it reaches a certain point.
    but i would like the from address to read something like "[email protected]" instead of my email address.
    here is the code I am using to send the mail
    to sendTheMail(mailRecp,mailSubject,mailBody)
    tell application "Mail"
    set theNewMessage to mail new outgoing message with properties{subject:mailSubject,content:mailBody,visible:false}
    tell theNewMessage to recipient at end of recipients with properties{address:mailRecp}
    end tell
    end tell
    end sendTheMail
    Where can I put the line to override the from address?
    I can't seem to find any information on that.
    Thanks,
    Pendal

    This is quite simple.
    FIrst, though, you have to have an account configured in Mail with the email address you want to use - you don't have to enable Checking for that account, but it must exist. Then you can just:
    to sendTheMail(mailRecp, mailSubject, mailBody)
      tell application "Mail"
        set theNewMessage to make new outgoing message with properties {subject:mailSubject, content:mailBody, visible:true}
        tell theNewMessage
          make new recipient at end of to recipients with properties {address:mailRecp}
          set sender to "[email protected]"
        end tell
      end tell
    end sendTheMail

  • Reply with attachments

    I recently upgraded both my and my moms iPad to iOS 7 and I needed to reply to a automated system with a .doc I'm using quickoffice to create the .doc file but when I open the option to mail it only offers it as a new message. Is there any way to reply with the file through the Mail app or quickoffice.?

    Hello Tim.
    With a received message, the choices are Reply, Reply All or Forward.
    Selecting Reply will reply to the sender only of the selected message and the sender's email address will be automatically entered in the To: field.
    Selecting Reply All will reply to all recipients of the selected message.
    When selecting Forward for a selected message, no email addresses are automatically entered which is the same for any email client.

  • MAIL - click REPLY, Mail uses different email account to send reply

    MBP Early 2011
    4 GB Memory 2.3 i5
    10.7.5
    Hi.
    When I click reply in MAIL the from field gets filled with one of my other account emails. I want the from email address to be the same as the original address the other person used. I get the drop down window to decide which account to use. But MAIL always picks the same less used account to fill the field. I have looked and can't find the way to fix this.
    The "send new message from" box has the proper email/account highlighted. Mail still uses one of my other accounts/emails -- mind you it is always the same account it uses.

    One option you can do is to rename the plist file, which keeps track of your mail options. It's possible it's corrupt and not recognizing your change. The downside is you may have to enter your mail account information and options again.
    If you want to try it, close the mail application. Go to "your user name"/library/preferences and find com.apple.mail.plist . Hold down the alt key, click on it, and rename it, perhaps to com.apple.mail.oldplist. Restart mail, which will create a new plist file. Go into Preferences and on the composing tab set it to what you want.  If that now works, you can erase the file you renamed, or just leave it there if you want.

  • Extracting email addresses in Mail using AppleScript

    I am using the following script to extract "from" email addresses within a specific mailbox in the Mail app:
    tell application "Mail"
              set mlist to selection
              set cur_mbox to mailbox of item 1 of mlist
              repeat with msg in messages of cur_mbox
                        do shell script "echo " & quoted form of (sender of msg as rich text) & ">>~/.list.txt"
              end repeat
    end tell
    do shell script "cat ~/.list.txt |sort|uniq >~/desktop/list.txt; rm ~/.list.txt"
    This is the format of the names and emails that I am getting in the .txt file:
    "Person, Alex" <[email protected]>
    "Person, Bob" <[email protected]>
    "Person, Chris" <[email protected]>
    I would like to ONLY extract the email address, NOT the name of the person attached, so I can copy and paste them into an Excel spreadsheet very easily.  Can anyone offer up an edit to this script so I only get the list of email addresses in the text file?
    And if anyone wants to take it one step further... I am for sure going to have duplicate emails. Anyone have some script to eliminate doubles?
    Thanks in advance!!

    -

  • Using AppleScript to create folders and place files in them

    Hi guys,
    I've been reading through the forum for the better part of the last 6 hours wracking my brain trying to figure out how to accomplish what I'm trying to do. I've been playing around with Automator and also trying to decipher some Apple Script samples that were posted on here, but I'm really having no luck at all. I'm sure you've all been there where you feel like you're on an endless search to solve a problem and it feels like there's no hope. I've tried every single possible thing I can and I'm getting close, but it's never quite right.
    Here's what I'm trying to do, and hopefully some kind soul will help me out. I'm deseperately trying to figure this out, and any help at all would be GREATLY appreciated!
    I have a bunch of PDF files that I scan, in the hundreds. After I've scanned them I'm left with something like this:
    1234567_Elephant.pdf
    1234567_Duck.pdf
    1234567_Cat.pdf
    1234567_Cat_01.pdf
    1234567_Dog.pdf
    3431233_Elephant.pdf
    3431233_Dog.pdf
    3431233_Dog_01.pdf
    3431233_Duck.pdf
    etc...
    So they have a 7 digit ID, then the file name which is always one of the 4 options (I'm just using the animals as examples, but they would be other words).
    What I'd want the script to do is categorize these into folders based on the ID number, and then based on the "animal" and then the files within them. Note, some files have an _01 or _02 etc... appended to them. I don't know if this makes a difference.
    So after running the script I'd love to see
    1234567 (Folder)
         Elephant (Subfolder)
              1234567_Elephant.pdf (File)
         Duck (Subfolder)
              1234567_Duck.pdf (File)
         Cat (Subfolder)
              1234567_Cat.pdf (File)
              1234567_Cat_01.pdf (File)
         Dog (Subfolder)
              1234567_Dog.pdf (File)
    3431233
         Elephant
              3431233_Elephant.pdf
         Dog
              3431233_Dog.pdf
              3431233_Dog_01.pdf
         Duck
              3431233_Duck.pdf

    well, using a couple of stock handlers I had lying around, and making the following assumptions:
    that an underscore is always the delimiter used
    that the file name is always a single word like 'dog' or 'cat' (if you have multiple word file names, the script needs to be modified some)
    this should do what you ask:
    set mainFolder to (choose folder) as text
    tell application "System Events"
      -- get all the unsorted files, and loop through
              set unsortedFiles to every file of folder mainFolder whose visible is true
              repeat with thisFile in unsortedFiles
      -- split the file name on underscores and periods
                        set fileNameBits to my tid(name of thisFile, {"_", "."})
      -- first item of list is id, make/get correct folder
                        set IDFolder to my checkForFolder(mainFolder, item 1 of fileNameBits)
      -- second item of list is file name, make/get correct folder in id folder
                        set groupFolder to my checkForFolder(IDFolder, item 2 of fileNameBits)
      -- move file
      move thisFile to groupFolder
              end repeat
    end tell
    to checkForFolder(fParent, fName)
      -- subroutine checks for folder, creating it if it doesn't exist
              tell application "System Events"
                        if not (exists folder fName of folder fParent) then
                                  set output to path of (make new folder at end of folder fParent with properties {name:fName})
                        else
                                  set output to (path of (folder fName of folder fParent))
                        end if
              end tell
              return output
    end checkForFolder
    on tid(input, delim)
      -- subroutine for handling text item delimiters
              set {oldTID, my text item delimiters} to {my text item delimiters, delim}
              if class of input is list then
                        set output to input as text
              else
                        set output to text items of input
              end if
              set my text item delimiters to oldTID
              return output
    end tid

  • Use Applescript to create folder structure from Numbers document

    Hello All,
    I know this is possible and I am feeling close - I just couldn't find a post that addressed the issue I am having exactly. Essentially I have a client list with 211 business names in it. I am trying to create a script that will scan the first column of my Numbers document and create a folder structure from that list. I found a post on another website that gave me a rough template and this is where I am at:
    set destinationFolder to "MacHD:/Users//Documents/Work/Customers/:to:folder:"
    tell application "Numbers.app"
              set theCells to value of range "A1:A211" of active sheet
    end tell
    repeat with oneCell in theCells
              tell application "Finder" to make new folder at folder destinationFolder with properties {name:item 1 of oneCell}
    end repeat
    When I run this I get "Expected end of line but found class name." and in the result window it display "
    error "Can’t get value of range." number -1728 from «class NMCv» of «class NmCR»"
    I am completely new to this and don't really know how to debug. Any help would be appreciated! Thank you so much!
    Adam

    Here is an enhanced version which no longer use a loop to extract the selected values.
    --{code}
    set destinationFolder to "MacHD:/Users//Documents/Work/Customers/:to:folder:"
    tell application "Numbers.app"
              set theCells to value of range "A1:A211" of active sheet
    end tell
    repeat with oneCell in theCells
              tell application "Finder" to make new folder at folder destinationFolder with properties {name:item 1 of oneCell}
    end repeat
    set destinationFolder to "" & (path to desktop) & "  dossier"
    Select the range of source cells then run the script *)
    Grab parameters describing the selected cells *)
    set {dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    Extract the names from the selected cells *)
              tell column colNum1
                        set theNames to value of cells rowNum1 thru rowNum2
              end tell -- column
    end tell -- Numbers
    I always do my best to use System Events which is faster than the Finder *)
    tell application "System Events"
              repeat with aName in theNames
                        try
      make new folder at end of folder destinationFolder with properties {name:aName as text}
                        end try
              end repeat
    end tell
    --=====
    set { dName, sName, tName,  rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    on get_SelParams()
              local d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2
              tell application "Numbers" to tell document 1
                        set d_Name to its name
                        set s_Name to ""
                        repeat with i from 1 to the count of sheets
                                  tell sheet i to set maybe to the count of (tables whose selection range is not missing value)
                                  if maybe is not 0 then
                                            set s_Name to name of sheet i
                                            exit repeat
                                  end if -- maybe is not 0
                        end repeat
                        if s_Name is "" then
                                  if my parleAnglais() then
                                            error "No sheet has a selected table embedding at least one selected cell !"
                                  else
                                            error "Aucune feuille ne contient une table ayant au moins une cellule sélectionnée !"
                                  end if
                        end if
                        tell sheet s_Name to tell (first table where selection range is not missing value)
                                  tell selection range
                                            set {top_left, bottom_right} to {name of first cell, name of last cell}
                                  end tell
                                  set t_Name to its name
                                  tell cell top_left to set {row_Num1, col_Num1} to {address of its row, address of its column}
                                  if top_left is bottom_right then
                                            set {row_Num2, col_Num2} to {row_Num1, col_Num1}
                                  else
                                            tell cell bottom_right to set {row_Num2, col_Num2} to {address of its row, address of its column}
                                  end if
                        end tell -- sheet…
                        return {d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2}
              end tell -- Numbers
    end get_SelParams
    --=====
    on parle_anglais()
              return (do shell script "defaults read 'Apple Global Domain' AppleLocale") does not start with "fr_"
    end parle_anglais
    --=====
    --{code}
    Here is an alternate version of the piece of code extracting the values :
    --{code}
    Grab parameters describing the selected cells *)
    set {dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    Extract the names from the selected cells *)
              set cell1 to name of cell rowNum1 of column colNum1
              set cell2 to name of cell rowNum2 of column colNum1
              set theNames to value of cells of range (cell1 & ":" & cell2)
    end tell -- Numbers
    --{code}
    Yvan KOENIG (VALLAURIS, France) mercredi 25 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

Maybe you are looking for

  • Performance issue - Pricing Report

    Hi Experts, I have developed an ALV report and I need to improve the performance in production. I have a relatively complex issue here. I have to fetch data for pricing from a pricing condition from all the respective underlying condition tables (AXX

  • SQL*Loader and HTMLDB_APPLICATION_FILES

    Hello! Can I use SQL*Loader for loading data from file stored in HTMLDB_APPLICATION_FILES as blob to tables in database? Files are always CSV in my case. Best regards, Tom

  • The Active X control for Flash Player could not be registered

    The only problem i seem to be having is with the yahoo instant messanger (trying to play the music player) a pop up comes up with a Internet explorer installer add-on for adobe flash player 10. I have this already installed on my computer. When i try

  • Error in Update Process for optimistic locking

    Hello, I tried to create a tabular form according to this How-To: http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html which worked fine until I tried to implement the optimistic locking. I use the same upda

  • How to open a PDF within a PDF viewer embedded in a html page

    Hi. I'm trying to modify a jsp that opens a runtime generated pdf. Originally, the pdf is opened by prompting the Adobe Reader program, but now I need to open the pdf within the jsp (which also have other content, not just display the pdf). I tried t