Interface EmailProfile
- All Known Subinterfaces:
EmailProfile.Lifecycle,EmailProfile.Managed,SmtpEmailProfile
public interface EmailProfile
An EmailProfile exposes methods for sending emails.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAnEmailProfilewhich exposes additional methods for the Platform to drive the profile's lifecycle.static interfaceAnEmailProfilemanaged by the Platform. -
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<? extends SmtpEmailProfile>voidsendEmail(EmailMessage message) Send a new email using this profile.
-
Method Details
-
sendEmail
Send a new email using this profile.- Parameters:
message- theEmailMessageto send- Throws:
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
- Returns:
- an
Optionalcontaining thisEmailProfileas anSmtpEmailProfileif this profile supports SMTP. the returned Optional will be empty if this profile does not support SMTP.
-