Sudo Email Client
Interface encapsulating a library for interacting with the Sudo Platform Email service.
Samples
import android.content.Context
import com.sudoplatform.sudoemail.BaseTests
import com.sudoplatform.sudoemail.SudoEmailClient
import com.sudoplatform.sudoemail.SudoEmailNotifiableClient
import com.sudoplatform.sudoemail.SudoEmailNotificationHandler
import com.sudoplatform.sudoemail.types.EmailMessageReceivedNotification
import com.sudoplatform.sudonotification.SudoNotificationClient
import com.sudoplatform.sudouser.SudoUserClient
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.kotlin.mock
import org.robolectric.RobolectricTestRunner
fun main() {
//sampleStart
val emailClient = SudoEmailClient.builder()
.setContext(context)
.setSudoUserClient(sudoUserClient)
.build()
//sampleEnd
}
Types
Builder used to construct the SudoEmailClient.
Defines the exceptions for the email address based methods.
Defines the exceptions for the email blocklist based methods.
Defines the exceptions for the email configuration based methods.
Defines the exceptions for the email cryptographic keys based methods.
Defines the exceptions for the email folder based methods.
Defines the exceptions for the email message based methods.
Functions
Blocks the given email address(es) for the user identified
Check if an email address is available to be provisioned within a domain.
Create a custom named EmailFolder.
Creates a draft email message using RFC 6854 (supersedes RFC 822)(https://tools.ietf.org/html/rfc6854) data.
Delete a custom named EmailFolder. Any messages in the custom folder will be moved to TRASH.
Delete multiple draft email messages with a list of identifiers.
Delete a single EmailMessage using the id parameter.
Delete multiple EmailMessages using a list of identifiers.
Deprovision an EmailAddress.
Export the cryptographic keys to a key archive.
Get the configuration data for the email service.
Get a list of all of the configured domains. Primarily intended to be used as part of performing an email send operation in order to fetch all domains configured for the service so that appropriate encryption decisions can be made.
Retrieves a draft email message.
Get an EmailAddress using its identifier.
Get email address blocklist for given owner.
Get an EmailMessage using its identifier.
Get the RFC 6854 (supersedes RFC 822) data of an EmailMessage.
Get the body and attachment data of an EmailMessage.
Get a list of the supported email domains. Primarily intended to be used to perform a domain search which occurs prior to provisioning an email address.
Import cryptographic keys from a key archive.
Lists the metadata of all draft messages for the user.
Lists the metadata of all draft messages for the specified email address identifier.
Lists the metadata and content of all draft messages for the user.
Lists the metadata and content of all draft messages for the specified email address identifier.
Get a list of EmailAddresses.
Get a list of EmailAddresses owned by the Sudo identified by sudoId.
Get a ListOutput of EmailFolders.
Get a list of all EmailMessages for the user.
Get a list of EmailMessages for the specified email address identifier.
Get a list of EmailMessages for the specified email folder identifier.
Get a list of EmailAddressPublicInfo objects associated with the provided email addresses.
Provision an EmailAddress.
Send an email message using RFC 6854 (supersedes RFC 822)(https://tools.ietf.org/html/rfc6854) data.
Subscribes to be notified of new and deleted EmailMessages. Subscribing multiple times with the same subscriber id will cause the previous subscriber to be unsubscribed.
Subscribes to be notified of new and deleted EmailMessages.
Unblocks the given email address(es) for the logged in user
Unblocks the email addresses associated with the hashed values passed in for the logged in user
Unsubscribe all subscribers from receiving notifications about modifications to EmailMessages.
Unsubscribe the specified subscriber so that it no longer receives notifications about new or deleted EmailMessages.
Update a custom named EmailFolder.
Updates a draft email message using RFC 6854 (supersedes RFC 822)(https://tools.ietf.org/html/rfc6854) data.
Update the metadata of an EmailAddress.
Update multiple EmailMessages using a list of identifiers.