-
Notifications
You must be signed in to change notification settings - Fork 7
/
Original.applescript
72 lines (63 loc) · 2.82 KB
/
Original.applescript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
-- Mail.applescript
-- iCal
on show_mail_sbrs(subjectLine, messageText, myrecipients)
tell application "Mail"
set mymail to (make new outgoing message at the beginning of outgoing messages with properties {subject:subjectLine, content:messageText})
repeat with i from (count of myrecipients) to 1 by -1
tell mymail to make new to recipient at beginning of to recipients with properties {address:(item i of myrecipients)}
end repeat
set visible of mymail to true
activate
end tell
end show_mail_sbrs
on show_mail_sbr(subjectLine, messageText, myrecipient, myrecipientname)
tell application "Mail"
set mymail to (make new outgoing message at the beginning of outgoing messages with properties {subject:subjectLine, content:messageText})
tell mymail to make new to recipient at beginning of to recipients with properties {address:myrecipient, name:myrecipientname}
set visible of mymail to true
activate
end tell
end show_mail_sbr
on send_mail_sb(subjectLine, messageText)
tell application "Mail"
set mymail to (make new outgoing message at the beginning of outgoing messages with properties {subject:subjectLine, content:messageText})
set visible of mymail to true
activate
end tell
end send_mail_sb
on send_mail_sbr(subjectLine, messageText, myrecipient, myrecipientname)
tell application "Mail"
set mymail to (make new outgoing message at the beginning of outgoing messages with properties {subject:subjectLine, content:messageText})
tell mymail to make new to recipient at beginning of to recipients with properties {address:myrecipient, name:myrecipientname}
send mymail
end tell
end send_mail_sbr
on send_mail_sbrp(subjectLine, messageText, myrecipient, myrecipientname, invitationPath)
set pfile to POSIX file invitationPath
set myfile to pfile as alias
tell application "Mail"
set mymail to (make new outgoing message at the beginning of outgoing messages with properties {subject:subjectLine, content:messageText})
tell mymail to make new to recipient at beginning of to recipients with properties {address:myrecipient, name:myrecipientname}
tell mymail
tell content
make new attachment with properties {file name:myfile} at after the last word of the the last paragraph
end tell
end tell
send mymail
end tell
end send_mail_sbrp
on send_mail_sbp(subjectLine, messageText, invitationPath)
set pfile to POSIX file invitationPath
set myfile to pfile as alias
tell application "Mail"
set mymail to (make new outgoing message at the beginning of outgoing messages with properties {subject:subjectLine, content:messageText})
tell mymail
tell content
make new attachment with properties {file name:myfile} at after the last word of the the last paragraph
end tell
end tell
set visible of mymail to true
activate
end tell
end send_mail_sbp
property ASDScriptUniqueIdentifier : "Mail.applescript"