Fixed an error caused by toRecipients or body being null