Skip to main content

BRIMAPAccount

Represents an IMAP account. Should be instantiated with the user's credentials prior to beginning IMAP setup in BREReceiptManager. Inherits from BREmailAccount.

SDK Version: 3.2.0

Declaration

@interface BRIMAPAccount : BREmailAccount
class BRIMAPAccount : BREmailAccount

Quick Reference

Properties

PropertyDescription
webviewAuthEnabledWhether users authenticate in a webview (Gmail IMAP only)

Methods

MethodDescription
initWithGmailIMAPSets up the Gmail IMAP provider directly
initWithProvider:email:password:Links a user's IMAP account with credentials
configureCustomHost:port:useTLS:Configures a custom IMAP host for non-standard providers

Properties

webviewAuthEnabled

@property (nonatomic) BOOL webviewAuthEnabled;
var webviewAuthEnabled: Bool { get set }

Set this property to YES if you want users to provide input for each step from the authentication process directly in a webview.

note

Only affects the BREReceiptProviderGmailIMAP provider.

Default: NO


Methods

initWithGmailIMAP

- (nonnull instancetype)initWithGmailIMAP;
init(gmailIMAP: ())

Use this method to set up the Gmail IMAP provider directly.


initWithProvider:email:password:

- (nonnull instancetype)initWithProvider:(BREReceiptProvider)provider
email:(nonnull NSString *)email
password:(nonnull NSString *)password;
init(provider: BREReceiptProvider, email: String, password: String)

The first step in linking a user's IMAP account. Instantiate this class with the user's credentials.

Parameters:

ParameterDescription
providerThe provider for this IMAP account
emailThe email address for this IMAP account
passwordThe user's regular password — an "app password" will be created automatically during setup

configureCustomHost:port:useTLS:

- (void)configureCustomHost:(nonnull NSString *)host
port:(NSInteger)port
useTLS:(BOOL)useTLS;
func configureCustomHost(_ host: String, port: Int, useTLS: Bool)

If the IMAP provider is not Gmail, AOL, or Yahoo, use this method to specify the provider's configuration.

Parameters:

ParameterDescription
hostThe provider's IMAP host name
portThe provider's IMAP port
useTLSWhether the provider uses TLS (virtually all providers do)