Skip to content

Best Practices

Tim Csaky edited this page Apr 24, 2024 · 12 revisions

SMTP Best Practices

Behind the scenes, the Common Hosted Email Service dispatches SMTP email messages to the apps.smtp.gov.bc.ca SMTP server which is managed by OCIO.

Before you consider using CHES for your line of business needs, please review the following information regarding the best practices and general fair use limits for the apps.smtp.gov.bc.ca SMTP server.

Resources

CHES Usage

When using CHES, only government messages are allowed. For your sender (from) email address, you should only be using domains that OCIO Exchange hosts such as @gov.bc.ca or one of the other 60 plus domains that they manage. If you have requirements to send emails outside of that, please note that OCIO will not be updating their core SPF, DMARC or DKIM records with client server IPs as that is not permitted.

Requests to the CHES API must originate from an IP address within the BC Government's SPANBC network. If your application is hosted outside it (for example, in AWS or Azure), or if you want to use a separate or existing hosted domain, you will have to contact OCIO Messaging.

Booking a consultation with OCIO Messaging

This has the benefit of configuring the SPF, DMARC and DKIM records with your server IP addresses.

Rate Limits

While the CHES API is designed to be flexible and scale based on load demand, there are still general usage rate guidelines you should follow as recommended by OCIO for the underlying SMTP server:

Parameters Limits
Recipient rate limit 10,000 recipients per day
Recipient limit 500 recipients
Recipient proxy address limit 400
Message rate limit 30 messages per minute

If your line of business requires higher rate limits, please consult with OCIO Messaging at the beginning of the build.

CHES has no limit on number of attachments but each attachment is currently limited to 20MB (at least until we can integrate with COMS!) but the SMTP server has a '100MB size attachment restriction'. There are no restrictions on attached file types except the file needs to be encoded as 'base64', 'binary' or 'hex' encoding.

Spam Considerations

It's worth remembering that all every spam filter out there is different depending on the client or service you use. Here are some general recommendations:

  • Don't include textual spam triggers. (E.g. suspicious words in the subject or body.)
  • Use your own variation of a "no-reply" sender address. ([email protected] is reserved. You could for example use [email protected] instead.)
  • Consider the format of attached files. (E.g. zip files could trigger spam filters.)
  • Use a tool to check your email "score" (E.g. https://www.mail-tester.com/.)
Clone this wiki locally