What does Error Code: '300' mean?
Error Code 300 means that there was an invalid request when sending the message to Postmark. There are a few common situations where this happens:
Email addresses that have names or titles with punctuation
If an email address has a special character or punctuation, the name field needs to be quoted-escaped. Not doing so will often produce an Illegal email address error. To quote escape the address:
From : \Joe Sender, jr\ <sender@example.com>
Provide either email TextBody or HtmlBody or both
For sending messages through Postmark, we require a Plain Text and/or HTML body. The message body cannot be empty. This means that sending a message through Postmark with an attachment, but no message body, is not possible. To send an attachment, you would need to also include something in the message body.
Maximum of 50 recipients allowed per email message
Postmark has a limit of 50 recipients per message sent. That includes any collection of TO, CC, and BCC.
Recipient address longer than 254 characters
Each recipient address in To, Cc and Bcc can be up to 254 characters, the maximum length of a valid email address. Display names don’t count toward the limit. If any address is longer, the message is rejected.
Illegal email mailbox
The email address you’re providing may not be set up correctly. You’ll need to review the message you’re sending to Postmark to ensure the email address is properly formatted. Note, here are the regex validations we use on our backend to validate addresses:
Domain: ^((\.)?[a-zA-Z0-9\-])+$
Mailbox: ^[a-z0-9\.!#\$%&'`\*\+\-\/=\^_\{\}\|~]+$
Note: Based on RFC5322, we do not allow leading, trailing, and consecutive dots in the local part of the mail address.