Title: Re: Send message with different reply to than account
On 4/28/02 9:49 AM, "Tony White" <[EMAIL PROTECTED]> wrote:

> Is there a way using AppleScript to create an outgoing message with a
> different reply to address than the sending account?
>
> I tried adding the sender parameter to a make new message script. I received
> a message, clicked reply and did not see any effect of adding the sender
> line. I also looked at the Internet Headings and did not see any effect of
> adding the sender.

In a word, no. If you check the AppleScript Dictionary for 'outgoing message', as you profess to have done, you will not see 'sender' anywhere. 'sender' is a property only of 'incoming message'. The "From" line of outgoing messages is set by the account of the message, and this is how it should be: email messages are legal documents, or can be, and should only be recording accurate information.

You can set a Reply-To header for an account, which is different from its own email address. You do that in the Options page of the account setting / Additional Headers . Add

    Reply-To

and enter the address you want in the Value box next to it.
    
But you can't do it on a message-by-message basis, not even by AppleScript: you can't change the headers of an existing message. It's not such a big deal to make extra accounts with the settings you want. And you can certainly save most of that labour with an AppleScript. here's a script to make a new POP account based on an existing one, adding a Reply-To header. Run it as many time as as you need to, changing the header and account name only. You'll need to add the following settings manually:

� password (as a security measure, you can't get an account's password by AppleScript)
� SMTP password, if there is one (same)
� numbers for "partially download messages" and "delete from server after x days if you use those. Actually, if you _do_ use them, just add those properties to the script below. I've omitted them because of a bug that turns those settings ON even when they're OFF in the original.
�change the signature if you want to

But the script saves you all the laborious entry of server and email addresses, etc. If your account is IMAP, you'd make your own script on the same principles, using the properties in the Dictionary (far more available in X than 2001).


----------------New POP Account with Reply-To-----------------

If you want to add a Reply-To header for a message you're writing, run this script while the message window is open. You can do it any time before you send it. The script has to save it as a message (in drafts folder) first, but you can keep adding to it afterwards without having to re-save it. I'm going to do it with this very message, then continue writing a bit before sending it.

tell application "Microsoft Entourage"
    set sampleAccount to POP account "Silcom"
    tell sampleAccount
        set {fullName, emailAddress, SMTPserver, POPserver, POPid, onlineAccess, includeInSend, leaveOnServer, sendSecure, POPSSL, POPport, SMTPSSL, SMTPport, SMTPAuth, SMTPSettings, SMTPid, addlHeaders, defSigType, deleteWhenDeleted} to {full name, its email address, SMTP server, POP server, POP ID, allow online access, include in send and receive all, leave on server, send secure password, POP requires SSL, POP port, SMTP requires SSL, SMTP port, SMTP requires authentication, SMTP uses account settings, SMTP account ID, additional headers, default signature type, delete messages from server when deleted from computer}
        if defSigType = other then set defSigChoice to default signature choice
    end tell
    
    if addlHeaders � "" then set addlHeaders to addlHeaders & return
    set addlHeaders to addlHeaders & "Reply To: [EMAIL PROTECTED]"
    
    set newAccount to make new POP account with properties {name:"Reply George", full name:fullName, email address:emailAddress, SMTP server:SMTPserver, POP server:POPserver, POP ID:POPid, allow online access:onlineAccess, include in send and receive all:includeInSend, leave on server:leaveOnServer, send secure password:sendSecure, POP requires SSL:POPSSL, POP port:POPport, SMTP requires SSL:SMTPSSL, SMTP port:SMTPport, SMTP requires authentication:SMTPAuth, SMTP uses account settings:SMTPSettings, SMTP account ID:SMTPid, additional headers:addlHeaders, default signature type:defSigType, delete messages from server when deleted from computer:deleteWhenDeleted}
    
    if defSigType = other then set default signature choice of newAccount to defSigChoice
    
end tell


------------------end script-----------------


--
Paul Berkowitz

Reply via email to