• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: I need to create a script that changes my email ID on mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I need to create a script that changes my email ID on mail.app


  • Subject: Re: I need to create a script that changes my email ID on mail.app
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 12 May 2013 20:00:06 -0500

On May 12, 2013, at 14:51, Kerry Dawson <email@hidden> wrote:
I have been able to create two scripts for newly created emails - one which uses one email ID I use for friends on mail.app (iCloud) and another for business acquaintances. What I can't seem to do is create a script for an email like this that has my standard email address come up and I need to change that and the signature.
______________________________________________________________________

Hey Kerry,

Scripting Mail is not very straightforward.

------------------------------------------------------------------------------------------

set toName to "John Smith"
set toAddress to "email@hidden"
set _sender to "Christopher Stone <email@hidden>"
set _subject to "Test Message"
set _body to "Now is the time for all good men to come to the aid of their country."
set _sig to "Chris_Sig"

tell application "Mail"
  set _sig to signature _sig
  set _msg to make new outgoing message with properties {subject:_subject, content:_body & return & return}

  

  tell _msg
    set visible to true
    make new to recipient at end of to recipients with properties {name:toName, address:toAddress}
    set sender to _sender
    set message signature to _sig
  end tell

  

  activate
end tell

------------------------------------------------------------------------------------------

It is possible to search the list with Google:

tell application \"mail\" "make new outgoing message"  signature site:http://lists.apple.com/archives/applescript-users

You also should have some example scripts for Mail on your system.

 /Library/Scripts/Mail Scripts/

One of those is 'Create New Message.scpt', and it contains an example of using a signature.

--
Best Regards,
Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >I need to create a script that changes my email ID on mail.app (From: Kerry Dawson <email@hidden>)

  • Prev by Date: Re: Satimage XMLLib.osax
  • Next by Date: Re: Satimage XMLLib.osax
  • Previous by thread: Re: I need to create a script that changes my email ID on mail.app
  • Next by thread: Re: I need to create a script that changes my email ID on mail.app
  • Index(es):
    • Date
    • Thread