If defaultFromEmail is set in the XP mail configuration, it should be used in outgoing emails when it's not explicitly specified.
Examples (assume that defaultFromEmail is set to noreply@enonic.com):
1) If an email is sent with Some Name<email@domain.com> as a sender, use that as is.
2) If an email is sent with email@domain.com as a sender, use that as is.
3) If an email is sent with Some Name<> as a sender, substitute value from defaultFromEmail so that it's sent from Some Name<noreply@enonic.com>.
4) If an email is sent with <> as a sender or sender not specified, use value from defaultFromEmail so that it's sent from noreply@enonic.com.
Throw an error if the value from defaultFromEmail is required (like in cases 3 and 4 above) but not configured.
If
defaultFromEmail
is set in the XP mail configuration, it should be used in outgoing emails when it's not explicitly specified.Examples (assume that
defaultFromEmail
is set tonoreply@enonic.com
): 1) If an email is sent withSome Name<email@domain.com>
as a sender, use that as is. 2) If an email is sent withemail@domain.com
as a sender, use that as is. 3) If an email is sent withSome Name<>
as a sender, substitute value fromdefaultFromEmail
so that it's sent fromSome Name<noreply@enonic.com>
. 4) If an email is sent with<>
as a sender or sender not specified, use value fromdefaultFromEmail
so that it's sent fromnoreply@enonic.com
.Throw an error if the value from
defaultFromEmail
is required (like in cases 3 and 4 above) but not configured.