Error checking and continue script instead of exiting

I have different versions of mikrotik and one script. I want to run the same script on all mikrotiks. If the script gets a error during import. I do not want it to fail and not do anything. If it fails on a command I want it to try another command instead. Am I doing this right?

:if ([/tool e-mail set from=dallas@xxxxx.com server=67.63.xxx.xxx]) do={
} elsif ([/tool e-mail set from=dallas@xxxxx.com address=67.63.xxx.xxx]) do={
}


When I do this I get this error
expected end of command

I just want the script to try another command if fails. I know there is a way to do this. Thanks in advance.

From your main script you can execute scripts with different commands. If one fails execute another.