Error: 'Error sending mail to: <email address>' While Sending Email Notifications



At times, a customer might face an error similar to the following when the account attempts to send email notifications:

2/08/2019 13:54 (GMT01:00): Error sending mail to:, System.NullReferenceException: Object reference not set to an instance of an object. at Wasabi.Runtime.Mail.SmtpClient.EncodeAddress(MailAddress address) in c:\workspace\Manuscript\Manuscript\RC\fogbugz-group-integration\FogBugzUtils\FogCreek.Utilities\Wasabi\Runtime\Mail\SmtpClient.cs:line 287 at Wasabi.Runtime.Mail.SmtpClient.SendToStream(MailMessage message) in c:\workspace\Manuscript\Manuscript\RC\fogbugz-group-integration\FogBugzUtils\FogCreek.Utilities\Wasabi\Runtime\Mail\SmtpClient.cs:line 587 at Wasabi.Runtime.Mail.SmtpClient.GetRawMessage(MailMessage message) in c:\workspace\Manuscript\Manuscript\RC\fogbugz-group-integration\FogBugzUtils\FogCreek.Utilities\Wasabi\Runtime\Mail\SmtpClient.cs:line 560 at Wasabi.Runtime.Mail.MailMessage.Raw() in c:\workspace\Manuscript\Manuscript\RC\fogbugz-group-integration\FogBugzUtils\FogCreek.Utilities\Wasabi\Runtime\Mail\MailMessage.cs:line 505 at FogCreek.FogBugz.Global.QueueTheEmail(SimpleEmailOptions emailOptions, MailMessage msg) in c:\workspace\Manuscript\Manuscript\RC\fogbugz-group-integration\Website\FogBugz\MailUtil.cs:line 165 at FogCreek.Utilities.EmailHandler.SendDetailedEmail(SimpleEmailOptions emailOptions, Func`3 messageSender) in c:\workspace\Manuscript\Manuscript\RC\fogbugz-group-integration\FogBugzUtils\FogCreek.Utilities\Email\EmailHandler.cs:line 190 at FogCreek.FogBugz.Global.SendDetailedEmailImpl(SimpleEmailOptions emailOptions, String& sHtmlError, String& sContents, List`1 listUploadedAttachment) in c:\workspace\Manuscript\Manuscript\RC\fogbugz-group-integration\Website\FogBugz\MailUtil.cs:line 233.

When this happens, not only do the notifications get broken but also the email delivery can be compromised, causing the following error message while sending emails:

Some errors occurred while editing this case

An error occurred while sending mail.



Root Cause Analysis

This error is known to happen when the Notification Return Address contains an invalid email value.

E.g., A missing double-quote as seen in the following image:




  1. Go to Menu > Site Configuration > Mail.

  2. Ensure you update and provide a valid Notification Return Address:


Additional Information

    • In the image seen in the Root Cause section, the Notification Return Address value was missing the first double-quotes enclosing the name of the email. A typo this small is the main cause for the error message documented in the Overview.

    • As a reference, the Notification Return Address can contain the following:

      • Single email:
      • Name and email: "no-reply" <>

    • However, if the double-quote is missing at the beginning or end, or if a bracket is not correctly set, it breaks the email notifications.