tell application "Mail"
tell newMessage
set p to 6.1
try
repeat with themailitem in theCCRecipients
make new to recipient at end of to recipients with properties {address:themailitem}
end repeat
end try
try
make new attachment with properties {file name:PosixLogoPath as POSIX file} at before first paragraph
on error errmsg number errnum
tell application "System Events" to display dialog "eMailIt setting Logo error " & errmsg & " number " & errnum
end try
set c to count of paragraphs
if PosixjpgFilePath ≠ "" and ((my displayHourlyJobsFlag) or ("Hourly" is in my itemDetails)) then
try
make new attachment with properties {file name:PosixjpgFilePath as POSIX file} at before paragraph (c - 4)
on error errmsg number errnum
tell application "System Events" to display dialog "eMailIt setting jpg Chart error " & errmsg & " number " & errnum
end try
end if
set p to 18
if PosixFilePath ≠ "" and (my displayHourlyJobsFlag) then
try
make new attachment with properties {file name:PosixFilePath as POSIX file} at after last paragraph
on error errmsg number errnum
tell application "System Events" to display dialog "eMailIt setting compressed File error " & errmsg & " number " & errnum
end try
set p to 19
end if
end tell
end tell