I have a script that works to send email in most cases, but on specific errors, I want it to try another way or return the error. My problen is that if there’s an error on my second scenario, how do I return that error?
Here’s my script…
try
send raw mail to |to| from |from| raw source rawSource SMTP server smtpServer username |username| password |password| authentication |authentication|
on error errMsg number errorNumber
if the errorNumber is equal to 2753 or the errorNumber is equal to 502 then
send raw mail to |to| from |from| raw source rawSource SMTP server smtpServer username |username| password |password|
--- how do I catch and return the error here??
else
return "AppleScript Error: " & errMsg
end if
end try