Documentation ¶
Index ¶
- type EmailAddress
- type EmailDPClient
- type EmailSubmittedResponse
- type Recipients
- type Sender
- type SubmitEmailDetails
- type SubmitEmailRequest
- func (request SubmitEmailRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)
- func (request SubmitEmailRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, ...) (http.Request, error)
- func (request SubmitEmailRequest) RetryPolicy() *common.RetryPolicy
- func (request SubmitEmailRequest) String() string
- func (request SubmitEmailRequest) ValidateEnumValue() (bool, error)
- type SubmitEmailResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailAddress ¶
type EmailAddress struct { // ASCII only email address. Email *string `mandatory:"true" json:"email"` // Display name for the email address. UTF-8 is supported for display name RFC 2047 (https://www.rfc-editor.org/rfc/rfc2047). Name *string `mandatory:"false" json:"name"` }
EmailAddress Email address Object that holds display name and email address.
func (EmailAddress) String ¶
func (m EmailAddress) String() string
func (EmailAddress) ValidateEnumValue ¶
func (m EmailAddress) ValidateEnumValue() (bool, error)
ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly
type EmailDPClient ¶
type EmailDPClient struct { common.BaseClient // contains filtered or unexported fields }
EmailDPClient a client for EmailDP
func NewEmailDPClientWithConfigurationProvider ¶
func NewEmailDPClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client EmailDPClient, err error)
NewEmailDPClientWithConfigurationProvider Creates a new default EmailDP client with the given configuration provider. the configuration provider will be used for the default signer as well as reading the region
func NewEmailDPClientWithOboToken ¶
func NewEmailDPClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client EmailDPClient, err error)
NewEmailDPClientWithOboToken Creates a new default EmailDP client with the given configuration provider. The obotoken will be added to default headers and signed; the configuration provider will be used for the signer
as well as reading the region
func (*EmailDPClient) ConfigurationProvider ¶
func (client *EmailDPClient) ConfigurationProvider() *common.ConfigurationProvider
ConfigurationProvider the ConfigurationProvider used in this client, or null if none set
func (*EmailDPClient) SetRegion ¶
func (client *EmailDPClient) SetRegion(region string)
SetRegion overrides the region of this client.
func (EmailDPClient) SubmitEmail ¶
func (client EmailDPClient) SubmitEmail(ctx context.Context, request SubmitEmailRequest) (response SubmitEmailResponse, err error)
SubmitEmail Submits a formatted email.
See also ¶
Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/emaildataplane/SubmitEmail.go.html to see an example of how to use SubmitEmail API. A default retry strategy applies to this operation SubmitEmail()
type EmailSubmittedResponse ¶
type EmailSubmittedResponse struct { // The unique ID for the email's Message-ID header used for service log correlation. The submission will return an error if the syntax is not a valid RFC 5322 Message-ID. This will be generated if not provided. // Example: sdiofu234qwermls24fd@mail.example.com MessageId *string `mandatory:"true" json:"messageId"` // Email Delivery generated unique Envelope ID of the email submission. If you need to contact Email Delivery about a particular request, please provide the Envelope ID. EnvelopeId *string `mandatory:"true" json:"envelopeId"` // Return list of suppressed email addresses. SuppressedRecipients []EmailAddress `mandatory:"true" json:"suppressedRecipients"` }
EmailSubmittedResponse Response object that is returned to sender upon successfully submitting the email request.
func (EmailSubmittedResponse) String ¶
func (m EmailSubmittedResponse) String() string
func (EmailSubmittedResponse) ValidateEnumValue ¶
func (m EmailSubmittedResponse) ValidateEnumValue() (bool, error)
ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly
type Recipients ¶
type Recipients struct { // Array of To address. To []EmailAddress `mandatory:"false" json:"to"` // Array of CC address. Cc []EmailAddress `mandatory:"false" json:"cc"` // Array of BCC address. Bcc headers can only be viewed by non bcc recipients. Bcc []EmailAddress `mandatory:"false" json:"bcc"` }
Recipients The destination for the email, composed of To, CC, and BCC fields. NOTE: At least one of To, CC, and BCC must be provided. And max 50 recipients are allowed across the To:, CC: and BCC: fields.
func (Recipients) String ¶
func (m Recipients) String() string
func (Recipients) ValidateEnumValue ¶
func (m Recipients) ValidateEnumValue() (bool, error)
ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly
type Sender ¶
type Sender struct { SenderAddress *EmailAddress `mandatory:"true" json:"senderAddress"` // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the approved sender resource. CompartmentId *string `mandatory:"true" json:"compartmentId"` }
Sender The envelope and the header from email address details, that is sending the email. Email address must be an approved sender.
func (Sender) ValidateEnumValue ¶
ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly
type SubmitEmailDetails ¶
type SubmitEmailDetails struct { Sender *Sender `mandatory:"true" json:"sender"` Recipients *Recipients `mandatory:"true" json:"recipients"` // A short summary of the content, which will appear in the recipient's inbox. UTF-8 supported RFC 2047 (https://www.rfc-editor.org/rfc/rfc2047). Subject *string `mandatory:"true" json:"subject"` // The unique ID for the email's Message-ID header used for service log correlation. The submission will return an error if the syntax is not a valid RFC 5322 (https://www.rfc-editor.org/rfc/rfc5322) Message-ID. This will be generated if not provided. // Example: sdiofu234qwermls24fd@mail.example.com MessageId *string `mandatory:"false" json:"messageId"` // HTML body content in UTF-8. // NOTE: Even though bodytext and bodyhtml are both optional, at least one of them must be provided. BodyHtml *string `mandatory:"false" json:"bodyHtml"` // Text body content. // NOTE: Even though bodytext and bodyhtml are both optional, at least one of them must be provided. BodyText *string `mandatory:"false" json:"bodyText"` // The email address for the recipient to reply to. If left blank, defaults to the sender address. ReplyTo []EmailAddress `mandatory:"false" json:"replyTo"` // The header used by the customer for the email sent. Reserved headers are not allowed e.g "subject", "from", and "to" etc. // Example: `{"bar-key": "value"}` HeaderFields map[string]string `mandatory:"false" json:"headerFields"` }
SubmitEmailDetails Details that are required by the sender to submit a request to send email.
func (SubmitEmailDetails) String ¶
func (m SubmitEmailDetails) String() string
func (SubmitEmailDetails) ValidateEnumValue ¶
func (m SubmitEmailDetails) ValidateEnumValue() (bool, error)
ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly
type SubmitEmailRequest ¶
type SubmitEmailRequest struct { // Parameters for submitEmail API. SubmitEmailDetails `contributesTo:"body"` // The request ID for tracing from the system OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata }
SubmitEmailRequest wrapper for the SubmitEmail operation
See also ¶
Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/emaildataplane/SubmitEmail.go.html to see an example of how to use SubmitEmailRequest.
func (SubmitEmailRequest) BinaryRequestBody ¶
func (request SubmitEmailRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)
BinaryRequestBody implements the OCIRequest interface
func (SubmitEmailRequest) HTTPRequest ¶
func (request SubmitEmailRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)
HTTPRequest implements the OCIRequest interface
func (SubmitEmailRequest) RetryPolicy ¶
func (request SubmitEmailRequest) RetryPolicy() *common.RetryPolicy
RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
func (SubmitEmailRequest) String ¶
func (request SubmitEmailRequest) String() string
func (SubmitEmailRequest) ValidateEnumValue ¶
func (request SubmitEmailRequest) ValidateEnumValue() (bool, error)
ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly
type SubmitEmailResponse ¶
type SubmitEmailResponse struct { // The underlying http response RawResponse *http.Response // The EmailSubmittedResponse instance EmailSubmittedResponse `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact // Oracle about a particular request, please provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` }
SubmitEmailResponse wrapper for the SubmitEmail operation
func (SubmitEmailResponse) HTTPResponse ¶
func (response SubmitEmailResponse) HTTPResponse() *http.Response
HTTPResponse implements the OCIResponse interface
func (SubmitEmailResponse) String ¶
func (response SubmitEmailResponse) String() string