AutoSubmitted uses ConstantsTrait
Values of the `Auto-Submitted` header field (RFC 3834, RFC 5436).
Marks how a message was produced so that automated responders can avoid
mail loops: an auto-responder MUST NOT reply to a message that already
carries an Auto-Submitted value other than no.
if ( AutoSubmitted::isAutomated( $headerValue ) )
{
return ; // do not auto-reply
}
Tags
Table of Contents
Constants
- AUTO_GENERATED : string = 'auto-generated'
- `auto-generated` — Produced automatically (notifications, mailing lists, …).
- AUTO_NOTIFIED : string = 'auto-notified'
- `auto-notified` — A notification generated automatically (RFC 5436).
- AUTO_REPLIED : string = 'auto-replied'
- `auto-replied` — An automatic reply (vacation / out-of-office responders).
- NO : string = 'no'
- `no` — Authored by a human; not automatically submitted.
Methods
- isAutomated() : bool
- Whether a header value marks the message as automatically submitted (anything other than `no`), and therefore must not be auto-replied to.
Constants
AUTO_GENERATED
`auto-generated` — Produced automatically (notifications, mailing lists, …).
public
string
AUTO_GENERATED
= 'auto-generated'
AUTO_NOTIFIED
`auto-notified` — A notification generated automatically (RFC 5436).
public
string
AUTO_NOTIFIED
= 'auto-notified'
AUTO_REPLIED
`auto-replied` — An automatic reply (vacation / out-of-office responders).
public
string
AUTO_REPLIED
= 'auto-replied'
NO
`no` — Authored by a human; not automatically submitted.
public
string
NO
= 'no'
Methods
isAutomated()
Whether a header value marks the message as automatically submitted (anything other than `no`), and therefore must not be auto-replied to.
public
static isAutomated(string $value) : bool
Parameters
- $value : string
-
An
Auto-Submittedvalue (case-insensitive).
Return values
bool —true for the auto-* values, false for no / empty / unknown.