Re: Scripting Mail signatures
Re: Scripting Mail signatures
- Subject: Re: Scripting Mail signatures
- From: John Haley via AppleScript-Users <email@hidden>
- Date: Mon, 18 Nov 2019 12:16:08 -0600
Maybe lock the file when finished changing and unlock before changing?
tell application "Finder"
set locked of someAlias to true
end tell
> On Nov 18, 2019, at 5:15 AM, @lbutlr via AppleScript-Users
> <email@hidden> wrote:
>
> I had an AppleScript that set a signature in Mail which stopped working in,
> IIRC, Sierra when Apple changed how signatures were handled. I’ve tried
> various ways to get around the lack of AppleScript and I though I had it
> solved with the following bash script:
>
> #!/bin/bash
> SIGHOME="$HOME/.signature”
>
> # path to the signature to set
> RANDSIG=“/$HOME/Library/Mail/V7/MailData/Signatures/8B5FE177-9791-415A-B682-1EC1C8E77034.mailsignature"
> /usr/local/bin/fortune $HOME/mysigs > $SIGHOME
> echo "Content-Transfer-Encoding: 7bit
> Content-Type: text/html;
> charset=us-ascii
> Message-Id: <9CE2E775-248F-4CD7-B508-08638C22DA07>
> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.19\))
>
>
> <HTML>
> <BODY>
> -- <BR>$(<$SIGHOME)
> </BODY> </HTML>" > $RANDSIG
>
> exit 0
>
> This works, and set the file to the right contents, and the file can be
> updated easily. However, Mail app ignores the changes to the file. If mail is
> quit and then relaunched, the relaunch sets the signature back to what it was
> before the script ran and rewrites the file.
>
> The only thing I can think of is that the Message-Id: header somehow is in
> play.
>
> Has anyone figured out a way to programmatically and automatically change a
> signature in Mail.app?
>
>
> --
> I'd like to move us right along to a Peter Gibbons. Now we had a chance to
> meet
> this young man, and boy that's just a straight shooter with upper management
> written all over him.
>
> _______________________________________________
> 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
_______________________________________________
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