Interface EmailProfile
-
- All Known Subinterfaces:
EmailProfile.Lifecycle,EmailProfile.Managed,SmtpEmailProfile
public interface EmailProfileAn EmailProfile exposes methods for sending emails.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceEmailProfile.LifecycleAnEmailProfilewhich exposes additional methods for the Platform to drive the profile's lifecycle.static interfaceEmailProfile.ManagedAnEmailProfilemanaged by the Platform.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.Optional<? extends SmtpEmailProfile>getAsSmtpEmailProfile()voidsendEmail(EmailMessage message)Send a new email using this profile.
-
-
-
Method Detail
-
sendEmail
void sendEmail(EmailMessage message) throws java.lang.Exception
Send a new email using this profile.- Parameters:
message- theEmailMessageto send- Throws:
java.lang.Exception- if there was a problem sending the email. most profile types will throw an exception if the provided message argument has an empty "from", "contentType", or "toRecipients" field values
-
getAsSmtpEmailProfile
default java.util.Optional<? extends SmtpEmailProfile> getAsSmtpEmailProfile()
- Returns:
- an
Optionalcontaining thisEmailProfileas anSmtpEmailProfileif this profile supports SMTP. the returned Optional will be empty if this profile does not support SMTP.
-
-