Authorize

Connect to Exchange account

Arguments

Argument Type Default value Description
username straccount username
password straccount password
autodiscover bool Trueuse autodiscover or set it off
access_type str DELEGATE
server str Nonerequired for configuration options
primary_smtp_address str Noneby default set to username, but can be set to be different than username
param username:account username
param password:account password
param autodiscover:
 use autodiscover or set it off
param accesstype:
 default "DELEGATE", other option "IMPERSONATION"
param server:required for configuration options
param primary_smtp_address:
 by default set to username, but can be set to be different than username

Create Folder

Create email folder

Arguments

Argument Type Default value Description
folder_name str Nonename for the new folder
parent_folder str Nonename for the parent folder, by default INBOX
param folder_name:
 name for the new folder
param parent_folder:
 name for the parent folder, by default INBOX
return:True if operation was successful, False if not

Delete Folder

Delete email folder

Arguments

Argument Type Default value Description
folder_name str Nonecurrent folder name
parent_folder str Nonename for the parent folder, by default INBOX
param folder_name:
 current folder name
param parent_folder:
 name for the parent folder, by default INBOX
return:True if operation was successful, False if not

Empty Folder

Empty email folder of all items

Arguments

Argument Type Default value Description
folder_name str Nonecurrent folder name
parent_folder str Nonename for the parent folder, by default INBOX
delete_sub_folders bool Falsedelete sub folders or not, by default False
param folder_name:
 current folder name
param parent_folder:
 name for the parent folder, by default INBOX
param delete_sub_folders:
 delete sub folders or not, by default False
return:True if operation was successful, False if not

List Messages

List messages in the account inbox. Order by descending received time.

Arguments

Argument Type Default value Description
folder_name str None
count int 100number of messages to list

List messages in the account inbox. Order by descending received time.

param count:number of messages to list

Move Messages

Move message(s) from source folder to target folder

Arguments

Argument Type Default value Description
criterion str move messages matching this criterion
source str Nonesource folder
target str Nonetarget folder
contains bool Falseif matching should be done using contains matching and not equals matching, default False is means equals matching
param criterion:
 move messages matching this criterion
param source:source folder
param target:target folder
param contains:if matching should be done using contains matching and not equals matching, default False is means equals matching
return:boolean result of operation, True if 1+ items were moved else False

Criterion examples:

  • subject:my message subject
  • body:something in body
  • sender:sender@domain.com

Rename Folder

Rename email folder

Arguments

Argument Type Default value Description
oldname str Nonecurrent folder name
newname str Nonenew name for the folder
parent_folder str Nonename for the parent folder, by default INBOX
param oldname:current folder name
param newname:new name for the folder
param parent_folder:
 name for the parent folder, by default INBOX
return:True if operation was successful, False if not

Send Message

Keyword for sending message through connected Exchange account.

Arguments

Argument Type Default value Description
recipients strlist of email addresses, defaults to []
subject str message subject, defaults to ""
body str message body, defaults to ""
attachments str Nonelist of filepaths to attach, defaults to []
html bool Falseif message content is in HTML, default False
images str Nonelist of filepaths for inline use, defaults to []
cc str Nonelist of email addresses, defaults to []
bcc str Nonelist of email addresses, defaults to []
save bool Falseis sent message saved to Sent messages folder or not, defaults to False
param recipients:
 list of email addresses, defaults to []
param subject:message subject, defaults to ""
param body:message body, defaults to ""
param attachments:
 list of filepaths to attach, defaults to []
param html:if message content is in HTML, default False
param images:list of filepaths for inline use, defaults to []
param cc:list of email addresses, defaults to []
param bcc:list of email addresses, defaults to []
param save:is sent message saved to Sent messages folder or not, defaults to False

Email addresses can be prefixed with ex: to indicate an Exchange account address.

Recipients is a required parameter.

Wait For Message

Wait for email matching criterion to arrive into INBOX.

Arguments

Argument Type Default value Description
criterion str wait for message matching criterion
timeout float 5.0total time in seconds to wait for email, defaults to 5.0
interval float 1.0time in seconds for new check, defaults to 1.0
contains bool Falseif matching should be done using contains matching and not equals matching, default False is means equals matching
param criterion:
 wait for message matching criterion
param timeout:total time in seconds to wait for email, defaults to 5.0
param interval:time in seconds for new check, defaults to 1.0
param contains:if matching should be done using contains matching and not equals matching, default False is means equals matching
return:list of messages