Mail set TO field and send question...

Hello,
I need a little AppleScript help with Mail. Let's say I have an open outgoing mail message and I want to set the "to" field. How do I do this? Remember, this is with an existing open outgoing message, not an outgoing message I'm creating via AppleScript. Actually, I'm creating the message with the redirect AppleScript command, which is supposed to return an outgoing message, but it's broke and doesn't.
I know I can use System Events to post keystrokes, but there has to be a better way.
Also, is there a way to "Send" the message via AppleScipt? I know I can use the UI commands to select the menu item or push the button, but is there a way to send without relying on the GUI?
Thanks,
Allan

Ummm, the script seems to do nothing. I would think it would create a new message and address it to [email protected], but it just does nothing.
When I'm looking for is help to address an already open new message. For example:
Open Mail
Create a new message
Switch to Script Editor
Run a script that addresses the new message
Spcifically what I'm doing is trying to redirect a message. Here's how aI have to do it now:
tell application "Mail"
activate
set theRedirectRecipient to "[email protected]"
set theSanityCheckNumber to 30
set theCount to 0
set selection_list to selection
repeat with one_item in selection_list
set theID to (message id of one_item)
-- skip it if it was already redirected
set theHeaders to the name of the header of one_item
if theHeaders does not contain "resent-to" then
redirect one_item with opening window
delay 1 -- mail can get confused, so slow down a little
tell application "System Events"
tell process "Mail"
keystroke theRedirectRecipient
end tell
end tell
--delay 1 -- mail can get confused, so slow down a little
-- send the mesage
tell me to do_menu("Mail", "Message", "Send")
--delay 1 -- mail can get confused, so slow down a little
-- see if we should continue
-- if mail or this script does something screwy, we can abort here
set theCount to theCount + 1
if theCount mod theSanityCheckNumber is 0 then
tell me
activate
display dialog "We've redirected " & theCount & " of " & (count of items in selection_list) & ". Continue?"
end tell
tell application "Mail" to activate
end if
end if
end repeat
end tell
on domenu(appname, menu_name, menu_item)
try
-- bring the target application to the front
tell application app_name
activate
end tell
tell application "System Events"
tell process app_name
tell menu bar 1
tell menu bar item menu_name
tell menu menu_name
click menu item menu_item
end tell
end tell
end tell
end tell
end tell
return true
on error error_message
return false
end try
end do_menu
2.7 GHz Dual Mac OS X (10.4.8)

Similar Messages

  • Check for a Comma (,) in an address field and send tht (,) as blank space t

    Hi,
    I have requirement , where I'm supposed to check for a Comma (,) in an address field and send tht (,) as blank space to the workarea.
    Do we have any FM or any check method for this.
    Plz tell me.
    Rohini.

    Hi,
      say address fields is "v_addr"
    DATA : v_len TYPE I,
               v_cnt1 TYPE i,
               v_cnt2 TYPE I value 1.
    v_addr = 'adresss,fiedls '.
    v_len = strlen( v_addr ) .
    DO v_len TIMES.
         IF v_addr+v_cnt1(v_cnt2)  EQ ','  .
             v_addr+v_cnt1(v_cnt2) = ' '.
            v_cnt1 = v_cnt1 + 1.
         ENDIF. 
    ENDDO.

  • Extracting XML fields and send it to backend

    Can somebody give me an idea of how to take XML,extrace some fields from XML and send it to backend using stateless session bean?Which API's I should use?
    Thanks,
    Sonali

    First and the foremost thing you require is a Java XML Parser....there are plenty available....xml4j, xerces, etc....google search will certainly yield better results in this category....
    These tools will provide two ways to parse the given xml...DOM and SAX (don't ask me the details, pick up a book/search the net). Depending upon which parsing way you took, desired elements from the xml can be picked up....Now all of the code written to achieve the above can reside anywhere...either in a Swing client, Servlets, EJbs or whereever (of course you will require parsers jar file in the classpath). And then you can do anything with this data, send it to server or write it to a file!
    Hope it helps.....but I sincerely suggest gaining kowledge by reading doc & trying examples in Sun site....U will find plenty of tutorials
    Cheers,
    Manjunath

  • Just setting up FCE and have question

    This is probably a stupid question but when I set up FCE and select my external drive as my scratch drive, where will the project folder be created? Is it on the external drive with the clips etc. I import or will it be located in the documents folder on the system hard drive?
    Thanks

    If you set your scratch disk to an external drive, all files created by FCE during capture, rendering, auto-saving, and all support files (waveforms, thumbnails etc.) will be stored into the external drive. Instead your project file (.fcp) will be saved where you decide to, when you issue the Save Project As command. Project files are usually saved into the user document folder of the startup disk.
    A Final Cut Express Documents folder is created by FCE in the scratch disk, containing subfolders specific for each use. One specific subfolder (Capture Scratch) will store all media captured by FCE, and you must never delete files from that subfolder, unless you remove the whole project, because they contain your actual movies.
    A warning: in FCE a "clip" is in fact a "pointer to" a portion of the media file in the capture scratch folder, it is not the media file itself. When you capture, a new media file is created in the capture scratch folder and a new clip is created in the FCE browser pointing to that media file. But if you remove the clip in FCE you do not remove the corresponding media file. The opposite is also true: if you remove the media file from the folder the clip will still be in the FCE browser (or timeline) pointing to nothing. This is called an offline clip, which may also be reconnected to the same media file manually.
    Piero

  • Setting CC field in Sender Mail Adapter

    Hi,
    I am on SP16, and using Sender Mail Adapter.
    I need to retrieve the CC field from the mail.
    I have set the <i>Adapter-Specific Message Attributes</i>. ie.
    Set <i>Adapter-Specific Message Attributes</i>, and <i>Variable Transport Binding</i> boxes are checked.
    When I do this, the Communication Channel does not throw any error, but the message is not visible in SXMB_MONI.
    How do I retrieve the CC field?
    Regards,
    Puloma.

    Hi Bhavesh,
    I was unable to view the Message Monitoring in RWB yesterday. Now I checked under the Message Monitoring tab, and I see the following error:
    SOAPFault received from Integration Server. ErrorCode/Category: XIProtocol/WRONG_VALUE; Params: SOAP:Envelope(1)SOAP:Header(1)sap:DynamicConfiguration(3)sap:Record(8), SHeaderX-MS-HAS-ATTACHystem/MailC8DD36D@MailServerNamewithDomain) ready., ST: ST_XMS_MSGHDR30_DYNAMIC; AdditionalText: An error occurred when deserializing in the simple transformation program ST_XMS_MSGHDR30_DYNAMIC; ApplicationFaultMessage:  ; ErrorStack: XML tag SOAP:Envelope(1)SOAP:Header(1)sap:DynamicConfiguration(3)sap:Record(8) (or one of the attributes) has the incorrect value SHeaderX-MS-HAS-ATTACHystem/MailC8DD36D@MailServerNamewithDomain>) ready. An error occurred when deserializing in the simple transformation program ST_XMS_MSGHDR30_DYNAMIC Data loss occurred when converting SHeaderX-MS-HAS-ATTACHystem/MailC8DD36D@MailServerNamewithDomain) ready.
    Does this give any hints?
    Regards,
    Puloma.

  • How to set up an E-mail server, ( To recieve and send outside a company network)

    Hie,
    The scenario is, our company wants to start hosting their own emails and not through an ISP. I somehow managed to install and configure MS Exchange server 2010, we are able to send and receive mails but only when we are connected to our company network.
    Is there something i have missed?
    Regards
    Felix

    Hi,
    this should help you:
    Enable Outlook Anywhere:
    http://technet.microsoft.com/en-us/library/bb123542(v=exchg.141).aspx
    Enable Exchange ActiveSync:
    http://technet.microsoft.com/en-us/library/bb124234(v=exchg.141).aspx
    Understanding Outlook Web App:
    http://technet.microsoft.com/en-us/library/aa998629(v=exchg.141).aspx
    Hope that helps
    Regards
    Sebastian

  • How Can I export a specific Business Attribute set from CRM and send it to SAP Cloud System

    Hi,
    I have a scenario, where I have Business Attributes Set in CRM.
    But I want to send specific (not all ) Business Attribute from CRM to Cloud System (C4C).
    Is is possible via some customization.
    Thanks and Regards,
    Amit Khatwani

    Hi Padma,
    Do we have a standard BADI delievered for this integration from CRM to C4C.
    Or the customer has to implement the custom BADI and enhance the existing
    message type (process)?
    Best Regards,
    Amit Khatwani

  • G -MAIL FAILS TO SYNC AND SEND PICTURES

    Was working OK
    3 days ago my signup ACCOUNT Gmail no longer SYNCs or sends out pictures
    Removed battery, *228
    Next?

    im kinda having same problem i cant get my emails that are sent to my gmail account unless i go to gmail icon and load up emails then go into settings and hit refresh button then email will come to phone and i have everything in settings set right anyone else having this problem im also not getting anything from facebook and also if someone sends me a picture message it comes almost day later.

  • No 'new mail' counter in dock and sender address overwriting

    All of the sudden, new mail doesn't cause the icon in the dock to show the indicator/counter. I have tried resetting mail by throwing out previous settings, plists, etc. but it still isn't there. I also tried reinstalling the latest Tiger combined update. Still didn't work.
    In addition, when I look at mail, the sender's name/address is displayed almost on top of the subject heading.
    Any thoughts on how to fix this? I have also done the usual permissions repair, Disk Utility Repair and even TechTool Pro Repair
    20" intel iMac 2GHz, 2 GB memory   Mac OS X (10.4.8)  

    Everything is back to normal, although just performing the Font Book reset didn't work.
    I looked at all the fonts on my MacBook (in Font Book) and compared it with all the fonts that were on my iMac. Times and Helvetica were not there ( but there were Times CY, and Helvetica CY whatever they are!) There were some others as well. So I added them in using Font Book (rather than just dragging them to the respective Font folders) and now all is right with the world.
    Thanks!

  • Recently upgraded to Snow Leopard ever since I've been having trouble with POP 3 mail accounts both retrieving and sending.  Anyone else?  Any fixes?

    Any body else having this problem?  Any fixes?

    In mail, if you click on window, then connection doctor, what does it tell you about your mail accounts? If there's an issue, the receive and/or send status will be red .. green if OK.

  • Can I have automatic e-mail setting for ADDM and AWR reports??

    Can I have Automatic e-mail settings for all my AWR and ADDM reports so I don;t have to run the reports all the time but they can be sent over to my mailbox and I can review them, if at all I can do that then can I bound them to a particular time frame where I can recieve only those reports durin the peak usage of my database.
    thanks

    Hi Rohan,
    Can I have Automatic e-mail settings for all my AWR and ADDM reports so I don;t have to run the reports all the time but they can be sent over to my mailbox and I can review them,You bet! I do it for all of my databases:
    1 - Use a cron (or preferably dbms_scheduler) to schedule the awrrpt.sql execution, directing the report to a fixed file location (e.g. /tmp).
    2 - As step 2 from the scheduled task, direct the report as input to sendmail:
    For Windows:
    http://www.dba-oracle.com/t_e_mail_interface_windows.htm
    For Linux:
    http://www.dba-oracle.com/t_email_mailing_messages_plsql.htm
    For complete details of job scheduling, see Dr. Hall's book "Oracle Job Scheduling":
    http://www.rampant-books.com/book_2005_1_scheduling.htm
    Hope this helps. . . .
    Donald K. Burleson
    Oracle Press author

  • 3 year old set BBID password and security question and answer, i have 4 attempts left, what can i do??

     i cannot purchase any thing as i have  to log in usind BBID, my young son does not remember the password or the security question or the answer.please help

    How to change or reset a BlackBerry ID password
    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
    Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.
    SIM Free BlackBerry Unlocking FAQ
    Follow me on Twitter @knottyrope
    Want to thank me? Buy my KnottyRope App here
    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • Mail can 't receive and send after update to 10.8.2

    Well,I am sure the send server is ok,but on Apple Mail it did not work!
    why?

    If 10.7.0 or later...
    Bootup holding CMD+r, or the Option/alt key to boot from the Restore partition & use Disk Utility from there to Repair the Disk, then Repair Permissions.
    If that doesn't help Reinstall the OS.

  • Add fields so clients can sign electronically and send back

    I've read a bunch of discussions about how to add fields to forms but none of them answered all my questions.
    What I'd like to do is add a signature and text field (for date) to a PDF so that my clients can send them back signed electronically. I do not want to use EchoSign.
    I have Acrobat Pro v9.5.2. I added a signature field and text field per http://www.adobe.com/accessibility/products/acrobat/pdf/A9-creating-accessible-pdf-forms.p df. I read on an Adobe forum that I was supposed to go to Save as > Reader Extended to allow the user to sign the document and send back to me signed. However, all I have as save options are Save or Save As. There's no Save As > Reader Extended option and when I choose Save As the "Save as type" does not include Reader Extended either.
    Please post step by step instructions for how to do this (add 2 fields, save doc, send to client, have them sign and fill in fields and send back to me completed). Surely we can do this with 9 yes?
    Thanks so much in advance!

    Here are full instructions for version 9.5.2 in case they're helpful to anyone:
    How to add digital signature field to PDF using Adobe Acrobat Pro 9.5.2:
    1. Open PDF in Acrobat (Right click > Open with > Acrobat)
    2. Go to Forms > Add or Edit Fields
    3. Pop up box > select NO
    4. Click "Add New Field" button on top left > select Digital Signature
    5. Guideline-type things will appear > drag to where you want field.
    6. Click on the signature field and change name if you'd like.
    7. Click "Close From Editing" button on top left.
    8. Go to Advanced > Extend Features in Adobe Reader > Save Now
    9. Save it where you'd like
    How to Digitally Sign a Document with Adobe Reader
    1. Double click the signature field on the bottom right of the contract. A pop up box will appear.
    2. If it's the first time you'll be signing anything in Adobe Reader, select bottom option, "A new digital ID I want to create now" > click Next
    3. Fill in your name and email (required) > click Next
    4. Enter a password and then again in "Confirm password" and write down your password somewhere so you'll remember
    5. Click Finish. You're now ready to sign doc
    6. Enter the password you just created into "Password" field
    (To import graphic of your signature, from "appearance" field, select "Create New Appearance" > Enter title like "signature" > click "Imported graphic" option > click "File" (not sure but file might need to be a PDF) > click Okay and click okay again.
    7. Click "Sign"
    8. Save document - give it a name > Save.
    9. You should see signature in the signature field
    At any point in future you can come back to signature and right click (or ctrl click if mac):
    You can clear, validate, etc.
    If doc has been modified, you can "view signed version" or "show signed properties".
    Edit > Protection > Security Settings
    You can see any digital IDs you've set up, remove, add new ones, look at usage options,
    For more help, you can watch this video on "How to Digitally Sign a Document with Adobe Reader"
    http://tv.adobe.com/watch/acrobat-x/how-to-digitally-sign-a-document-with-adobe-reader/

  • Entourage Question: Enabling the "From" field for Send on Behalf emailing..

    You know like in Outlook 2003 Pro you can enable the "From" field and send an email as someone else (so long as you have permission to so that is)? How do you enable that same field in Entourage 2004?
    best regards,
    pheidippides

    Hi,
    Please make sure Domain1 is trusted by Domain2, then we can assign send as permission to Domain1 users for "DL System Admins" in Domain2.
    Thanks,
    Winnie Liang
    TechNet Community Support

Maybe you are looking for