Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Aouttier

macrumors member
Original poster
Mar 3, 2016
42
0
Belgium
I have tried several things, but none is working, so I'm addressing to the forum...

The following code does exactly what I want it do do:

Code:
tell application "Mail"
    set newMessage to make new outgoing message with properties {visible:true, sender:"Firstname Lastname <Firstname@telenet.be>"}
    activate
    tell newMessage
        set subject to "xxx"
    end tell
end tell

But when I want to send the mail to several recipients, its changing the sender to the default of mail. What I'm doing wrong. The code is:
Code:
set Geadresseerde to {"xxx.xxx@telenet.be", "yyy.yyyy@telenet.be"}

tell application "Mail"
    set newMessage to make new outgoing message with properties {visible:true, sender:"Firstname Lastname <Firstname@telenet.be>"}
    activate
    tell newMessage
        set subject to "xxx"
        activate
        repeat with i from 1 to count Geadresseerde
            make new to recipient at end of every to recipient with properties {address:item i of Geadresseerde}
        end repeat
    end tell
end tell

Thank in advance
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.