Set Mail Class with SMTP AUTH
The recommend way to set the Mail Class and Instance-ID for each message is by setting the X-GreenArrow-MailClass and X-GreenArrow-InstanceID headers. If you’re unable to do that, then this page describes an alternative approach which allows you to specify which Mail Class and Instance-ID to use via the SMTP AUTH username that’s used for injecting email.
Here’s how to implement this:
- Enable SimpleMH by default for the SMTP2 service.
- Create a new SMTP AUTH user whose localpart is of the form
mailclass-{MAIL_CLASS_NAME}
ormailclass-{MAIL_CLASS_NAME}-{INSTANCE_ID}
, where{MAIL_CLASS_NAME}
is replaced with the desired Mail Class and{INSTANCE_ID}
is replaced with the desired InstanceID. Here are two examples:-
[email protected]
- use thefoo
Mail Class and the default InstanceID. -
[email protected]
- use thefoo
Mail Class and the1bar
InstanceID. Remember that InstanceIDs have restrictions documented on this page.
-
- Inject mail into the SMTP2 service (which runs on port
587
by default) using the SMTP AUTH username that you created in the previous step.
If you inject any mail using the above method which also has the X-GreenArrow-MailClass and X-GreenArrow-InstanceID headers set, those headers’ values take precedence over the information encoded in the username.