What does Error Code: '300' mean?
Error Code 300 means that there was an invalid request when sending the message to Postmark. There are three 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 quote escaped. Not doing so will often produce a "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.
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.