Package osaf :: Package pim :: Module mail
[hide private]
[frames] | no frames]

Module mail

source code

Classes used for Mail parcel kinds.

Classes [hide private]
  MailPreferences
  ConnectionSecurityEnum
  AccountBase
  IncomingAccount
  OutgoingAccount
  SMTPAccount
  IMAPAccount
  ProtocolTypeEnum
  IMAPFolder
  POPAccount
  MIMEBase
Superclass for the various MIME classes
  MIMENote
MIMEBase and Note, rolled into one
  MIMEContainer
  MailStamp
MailStamp is the bag of Message-specific attributes.
  MIMEBinary
  MIMEText
  MIMESecurity
  CollectionInvitation
  EmailAddresses
  EmailAddress
An item that represents a simple email address, plus all the info we might want to associate with it, like lists of message to and from this address.
  EmailComparator
Functions [hide private]
 
getMessageBody(mailStamp) source code
 
getForwardBody(mailStamp) source code
 
getReplyBody(mailStamp) source code
 
formatDateAndTime(view, dateStamp) source code
 
isMeAddress(addr) source code
 
in_collection(addr, collection) source code
 
getRecurrenceMailStamps(mailStamp)
Recurring mails get most of their mail attributes from the recurrence master, but a few details (subject, body, description) are based on which occurrence was sent.
source code
 
getBodyValues(mailStamp, addGT=True, usePrefix=True) source code
 
buildItemDescription(mailStamp) source code
 
buildKindCombination(mailStamp, usePrefix=True) source code
 
__actionOnMessage(view, mailStamp, action='REPLY') source code
 
replyToMessage(view, mailStamp)
Returns: a Note item which has been stamped as a c{MailStamp}
source code
 
replyAllToMessage(view, mailStamp)
Returns: a Note item which has been stamped as a c{MailStamp}
source code
 
forwardMessage(view, mailStamp)
Returns: a Note item which has been stamped as a c{MailStamp}
source code
 
checkIfToMe(mailStamp) source code
 
checkIfFromMe(mailStamp) source code
 
getCurrentOutgoingAccount(view, ignorePassword=True)
This function returns the default OutgoingAccount account or the first OutgoingAccount found if no default exists.
source code
 
getCurrentIncomingAccount(view, ignorePassword=True)
This function returns the current (default) IncomingAccount in the Repository.
source code
 
getCurrentMeEmailAddress(view) source code
 
getCurrentMeEmailAddresses(view) source code
 
_recalculateMeEmailAddresses(view) source code
 
addressMatchGenerator(address) source code
 
_registerNewMeAddress(newAddress)
If this address isn't a "me" address, make it one.
source code
 
_potentialMeAccount(account)
Checks the account settings to confirm that account is active and has a host name filled in.
source code
 
_calculateCurrentMeEmailAddress(view)
Lookup the "me" EmailAddress.
source code
 
_calculateCurrentMeEmailAddresses(view)
Returns a list of c{EmailAddress} items.
source code
 
MailMessage(*args, **keywds)
Return a newly created Note, stamped with MailStamp.
source code
 
makeCompareMethod(attrName) source code
Variables [hide private]
  log = logging.getLogger(__name__)
  MESSAGE = u'Message'
  TASK = u'Task'
  EVENT = u'Event'
  R_EVENT = u'Recurring Event'
  A_EVENT = u'All-day Event'
  AT_EVENT = u'Any-time Event'
  RA_EVENT = u'Recurring All-day Event'
  RAT_EVENT = u'Recurring Any-time Event'
  SCHEDULED_TASK = u'Scheduled Task'
  R_SCHEDULED_TASK = u'Recurring Scheduled Task'
  A_SCHEDULED_TASK = u'All-day Scheduled Task'
  AT_SCHEDULED_TASK = u'Any-time Scheduled Task'
  P_TASK = u'a Task'
  P_EVENT = u'an Event'
  P_R_EVENT = u'a Recurring Event'
  P_A_EVENT = u'an All-day Event'
  P_AT_EVENT = u'a Any-time Event'
  P_RA_EVENT = u'a Recurring All-day Event'
  P_RAT_EVENT = u'a Recurring Any-time Event'
  P_SCHEDULED_TASK = u'a Scheduled Task'
  P_R_SCHEDULED_TASK = u'a Recurring Scheduled Task'
  P_A_SCHEDULED_TASK = u'an All-day Scheduled Task'
  P_AT_SCHEDULED_TASK = u'an Any-time Scheduled Task'
  C_TITLE = u'Custom recurrence rule: No description.\n\n%(title...
  CD_TITLE = u'Custom recurrence rule: No description.\n\n%(titl...
  CS_TITLE = u'Custom recurrence rule: No description\n\n%(title...
  CSX_TITLE = u'Custom recurrence rule: No description\n\n%(titl...
  CSD_TITLE = u'Custom recurrence rule: No description\n\n%(titl...
  CL_TITLE = u'Custom recurrence rule: No description.\n\n%(titl...
  CLD_TITLE = u'Custom recurrence rule: No description.\n\n%(tit...
  CLS_TITLE = u'Custom recurrence rule: No description\n\n%(titl...
  CLSX_TITLE = u'Custom recurrence rule: No description\n\n%(tit...
  CLSD_TITLE = u'Custom recurrence rule: No description\n\n%(tit...
  A_TITLE = u'%(title)s on %(startDate)s'
  AD_TITLE = u'%(title)s from %(startDate)s - %(endDate)s'
  AL_TITLE = u'%(title)s at %(location)s on %(startDate)s'
  ALD_TITLE = u'%(title)s at %(location)s from %(startDate)s - %...
  E_TITLE = u'%(title)s on %(startDate)s from %(startTime)s - %(...
  EX_TITLE = u'%(title)s on %(startDate)s at %(startTime)s %(tim...
  ED_TITLE = u'%(title)s on %(startDate)s - %(endDate)s from %(s...
  EL_TITLE = u'%(title)s at %(location)s on %(startDate)s from %...
  ELX_TITLE = u'%(title)s at %(location)s on %(startDate)s at %(...
  ELD_TITLE = u'%(title)s at %(location)s on %(startDate)s - %(e...
  D_TITLE = u'%(title)s every day'
  DU_TITLE = u'%(title)s every day until %(recurrenceEndDate)s'
  DL_TITLE = u'%(title)s at %(location)s every day'
  DUL_TITLE = u'%(title)s at %(location)s every day until %(recu...
  DT_TITLE = u'%(title)s every day from %(startTime)s - %(endTim...
  DTX_TITLE = u'%(title)s every day at %(startTime)s %(timezone)s'
  DTU_TITLE = u'%(title)s every day from %(startTime)s - %(endTi...
  DTUX_TITLE = u'%(title)s every day at %(startTime)s %(timezone...
  DTL_TITLE = u'%(title)s at %(location)s every day from %(start...
  DTLX_TITLE = u'%(title)s at %(location)s every day at %(startT...
  DTUL_TITLE = u'%(title)s at %(location)s every day from %(star...
  DTULX_TITLE = u'%(title)s at %(location)s every day at %(start...
  W_TITLE = u'%(title)s every %(dayName)s'
  WU_TITLE = u'%(title)s every %(dayName)s until %(recurrenceEnd...
  WL_TITLE = u'%(title)s at %(location)s every %(dayName)s'
  WUL_TITLE = u'%(title)s at %(location)s every %(dayName)s unti...
  WT_TITLE = u'%(title)s every %(dayName)s from %(startTime)s - ...
  WTX_TITLE = u'%(title)s every %(dayName)s at %(startTime)s %(t...
  WTU_TITLE = u'%(title)s every %(dayName)s from %(startTime)s -...
  WTUX_TITLE = u'%(title)s every %(dayName)s at %(startTime)s %(...
  WTL_TITLE = u'%(title)s at %(location)s every %(dayName)s from...
  WTLX_TITLE = u'%(title)s at %(location)s every %(dayName)s at ...
  WTUL_TITLE = u'%(title)s at %(location)s every %(dayName)s fro...
  WTULX_TITLE = u'%(title)s at %(location)s every %(dayName)s at...
  B_TITLE = u'%(title)s every other %(dayName)s'
  BU_TITLE = u'%(title)s every other %(dayName)s until %(recurre...
  BL_TITLE = u'%(title)s at %(location)s every other %(dayName)s'
  BUL_TITLE = u'%(title)s at %(location)s every other %(dayName)...
  BT_TITLE = u'%(title)s every other %(dayName)s from %(startTim...
  BTX_TITLE = u'%(title)s every other %(dayName)s at %(startTime...
  BTU_TITLE = u'%(title)s every other %(dayName)s from %(startTi...
  BTUX_TITLE = u'%(title)s every other %(dayName)s at %(startTim...
  BTL_TITLE = u'%(title)s at %(location)s every other %(dayName)...
  BTLX_TITLE = u'%(title)s at %(location)s every other %(dayName...
  BTUL_TITLE = u'%(title)s at %(location)s every other %(dayName...
  BTULX_TITLE = u'%(title)s at %(location)s every other %(dayNam...
  M_TITLE = u'%(title)s every month on the %(dayOfMonth)s%(abbre...
  MU_TITLE = u'%(title)s every month on the %(dayOfMonth)s%(abbr...
  ML_TITLE = u'%(title)s at %(location)s every month on the %(da...
  MUL_TITLE = u'%(title)s at %(location)s every month on the %(d...
  MT_TITLE = u'%(title)s every month on the %(dayOfMonth)s%(abbr...
  MTX_TITLE = u'%(title)s every month on the %(dayOfMonth)s%(abb...
  MTU_TITLE = u'%(title)s every month on the %(dayOfMonth)s%(abb...
  MTUX_TITLE = u'%(title)s every month on the %(dayOfMonth)s%(ab...
  MTL_TITLE = u'%(title)s at %(location)s every month on the %(d...
  MTLX_TITLE = u'%(title)s at %(location)s every month on the %(...
  MTUL_TITLE = u'%(title)s at %(location)s every month on the %(...
  MTULX_TITLE = u'%(title)s at %(location)s every month on the %...
  Y_TITLE = u'%(title)s every year on %(startDate)s'
  YU_TITLE = u'%(title)s every year on %(startDate)s until %(rec...
  YL_TITLE = u'%(title)s at %(location)s every year on %(startDa...
  YUL_TITLE = u'%(title)s at %(location)s every year on %(startD...
  YT_TITLE = u'%(title)s every year on %(startDate)s from %(star...
  YTX_TITLE = u'%(title)s every year on %(startDate)s at %(start...
  YTD_TITLE = u'%(title)s every year on %(startDate)s - %(endDat...
  YTU_TITLE = u'%(title)s every year on %(startDate)s from %(sta...
  YTUX_TITLE = u'%(title)s every year on %(startDate)s at %(star...
  YTUD_TITLE = u'%(title)s every year on %(startDate)s - %(endDa...
  YTL_TITLE = u'%(title)s at %(location)s every year on %(startD...
  YTLX_TITLE = u'%(title)s at %(location)s every year on %(start...
  YTLD_TITLE = u'%(title)s at %(location)s every year on %(start...
  YTUL_TITLE = u'%(title)s at %(location)s every year on %(start...
  YTULX_TITLE = u'%(title)s at %(location)s every year on %(star...
  YTULD_TITLE = u'%(title)s at %(location)s every year on %(star...
  DAY_OF_MONTH = u'1#st|2#nd|3#rd|4#th|5#th|6#th|7#th|8#th|9#th|...
  NEW_BODY_SAME_FROM = u'%(sender)s sent you %(kindCombination)s...
  UPDATE_BODY_SAME_FROM = u'%(sender)s sent you an Update on %(k...
  NEW_BODY_DIFFERENT_FROM = u'%(sender)s sent you %(kindCombinat...
  UPDATE_BODY_DIFFERENT_FROM = u'%(sender)s sent you an Update o...
  ACCOUNT_TYPES = {'IMAP': <class 'osaf.pim.mail.IMAPAccount'>, ...
Function Details [hide private]

getRecurrenceMailStamps(mailStamp)

source code 
Recurring mails get most of their mail attributes from the recurrence master, but a few details (subject, body, description) are based on which occurrence was sent. Return (mailStampOccurrence, mailStampMaster), which will be equal for non-recurring events.

replyToMessage(view, mailStamp)

source code 
Returns:
a Note item which has been stamped as a c{MailStamp}

replyAllToMessage(view, mailStamp)

source code 
Returns:
a Note item which has been stamped as a c{MailStamp}

forwardMessage(view, mailStamp)

source code 
Returns:
a Note item which has been stamped as a c{MailStamp}

getCurrentOutgoingAccount(view, ignorePassword=True)

source code 

This function returns the default OutgoingAccount account or the first OutgoingAccount found if no default exists.

@return OutgoingAccount or None

getCurrentIncomingAccount(view, ignorePassword=True)

source code 

This function returns the current (default) IncomingAccount in the Repository.

@return IncomingAccount or None

_registerNewMeAddress(newAddress)

source code 

If this address isn't a "me" address, make it one.
- add it to the "me" list
- reconsider toMe/fromMe of any messages that reference this address
- Do the same for all existing EmailAddress items whose emailAddress
  attribute differs from this only by case.

_calculateCurrentMeEmailAddress(view)

source code 

Lookup the "me" EmailAddress.

The "me" is determined as follows:
  1. Return the default outgoing email address
  2. Return the first outgoing account containing an email address
  3. Return the default incoming email address
  4. Return the first incoming account containing an email address
  5. Return None

_calculateCurrentMeEmailAddresses(view)

source code 

Returns a list of c{EmailAddress} items.
The list contains the email addresses
for all configured Outgoing and Incoming
Accounts.

The list email address ordering will be determined
 as follows:
     1. The default outgoing email address
     2. Any outgoing account containing an email address
     3. The default incoming email address
     4. Any incoming account containing an email address

Note that there may be other EmailAddress items in the historic
meEmailAddressCollection that differ only from these by case; we
don't add them here, though, because we don't want them in eg popups.


Variables Details [hide private]

C_TITLE

Value:
u'''Custom recurrence rule: No description.

%(title)s on %(startDate)s'''

CD_TITLE

Value:
u'''Custom recurrence rule: No description.

%(title)s from %(startDate)s - %(endDate)s'''

CS_TITLE

Value:
u'''Custom recurrence rule: No description

%(title)s on %(startDate)s from %(startTime)s - %(endTime)s %(timezone\
)s'''

CSX_TITLE

Value:
u'''Custom recurrence rule: No description

%(title)s on %(startDate)s at %(startTime)s %(timezone)s'''

CSD_TITLE

Value:
u'''Custom recurrence rule: No description

%(title)s on %(startDate)s - %(endDate)s from %(startTime)s - %(endTim\
e)s %(timezone)s'''

CL_TITLE

Value:
u'''Custom recurrence rule: No description.

%(title)s at %(location)s on %(startDate)s'''

CLD_TITLE

Value:
u'''Custom recurrence rule: No description.

%(title)s at %(location)s from %(startDate)s - %(endDate)s'''

CLS_TITLE

Value:
u'''Custom recurrence rule: No description

%(title)s at %(location)s on %(startDate)s from %(startTime)s - %(endT\
ime)s %(timezone)s'''

CLSX_TITLE

Value:
u'''Custom recurrence rule: No description

%(title)s at %(location)s on %(startDate)s at %(startTime)s %(timezone\
)s'''

CLSD_TITLE

Value:
u'''Custom recurrence rule: No description

%(title)s at %(location)s on %(startDate)s - %(endDate)s from %(startT\
ime)s - %(endTime)s %(timezone)s'''

ALD_TITLE

Value:
u'%(title)s at %(location)s from %(startDate)s - %(endDate)s'

E_TITLE

Value:
u'%(title)s on %(startDate)s from %(startTime)s - %(endTime)s %(timezo\
ne)s'

EX_TITLE

Value:
u'%(title)s on %(startDate)s at %(startTime)s %(timezone)s'

ED_TITLE

Value:
u'%(title)s on %(startDate)s - %(endDate)s from %(startTime)s - %(endT\
ime)s %(timezone)s'

EL_TITLE

Value:
u'%(title)s at %(location)s on %(startDate)s from %(startTime)s - %(en\
dTime)s %(timezone)s'

ELX_TITLE

Value:
u'%(title)s at %(location)s on %(startDate)s at %(startTime)s %(timezo\
ne)s'

ELD_TITLE

Value:
u'%(title)s at %(location)s on %(startDate)s - %(endDate)s from %(star\
tTime)s - %(endTime)s %(timezone)s'

DUL_TITLE

Value:
u'%(title)s at %(location)s every day until %(recurrenceEndDate)s'

DT_TITLE

Value:
u'%(title)s every day from %(startTime)s - %(endTime)s %(timezone)s'

DTU_TITLE

Value:
u'%(title)s every day from %(startTime)s - %(endTime)s %(timezone)s un\
til %(recurrenceEndDate)s'

DTUX_TITLE

Value:
u'%(title)s every day at %(startTime)s %(timezone)s until %(recurrence\
EndDate)s'

DTL_TITLE

Value:
u'%(title)s at %(location)s every day from %(startTime)s - %(endTime)s\
 %(timezone)s'

DTLX_TITLE

Value:
u'%(title)s at %(location)s every day at %(startTime)s %(timezone)s'

DTUL_TITLE

Value:
u'%(title)s at %(location)s every day from %(startTime)s - %(endTime)s\
 %(timezone)s until %(recurrenceEndDate)s'

DTULX_TITLE

Value:
u'%(title)s at %(location)s every day at %(startTime)s %(timezone)s un\
til %(recurrenceEndDate)s'

WU_TITLE

Value:
u'%(title)s every %(dayName)s until %(recurrenceEndDate)s'

WUL_TITLE

Value:
u'%(title)s at %(location)s every %(dayName)s until %(recurrenceEndDat\
e)s'

WT_TITLE

Value:
u'%(title)s every %(dayName)s from %(startTime)s - %(endTime)s %(timez\
one)s'

WTX_TITLE

Value:
u'%(title)s every %(dayName)s at %(startTime)s %(timezone)s'

WTU_TITLE

Value:
u'%(title)s every %(dayName)s from %(startTime)s - %(endTime)s %(timez\
one)s until %(recurrenceEndDate)s'

WTUX_TITLE

Value:
u'%(title)s every %(dayName)s at %(startTime)s %(timezone)s until %(re\
currenceEndDate)s'

WTL_TITLE

Value:
u'%(title)s at %(location)s every %(dayName)s from %(startTime)s - %(e\
ndTime)s %(timezone)s'

WTLX_TITLE

Value:
u'%(title)s at %(location)s every %(dayName)s at %(startTime)s %(timez\
one)s'

WTUL_TITLE

Value:
u'%(title)s at %(location)s every %(dayName)s from %(startTime)s - %(e\
ndTime)s %(timezone)s until %(recurrenceEndDate)s'

WTULX_TITLE

Value:
u'%(title)s at %(location)s every %(dayName)s at %(startTime)s %(timez\
one)s until %(recurrenceEndDate)s'

BU_TITLE

Value:
u'%(title)s every other %(dayName)s until %(recurrenceEndDate)s'

BUL_TITLE

Value:
u'%(title)s at %(location)s every other %(dayName)s until %(recurrence\
EndDate)s'

BT_TITLE

Value:
u'%(title)s every other %(dayName)s from %(startTime)s - %(endTime)s %\
(timezone)s'

BTX_TITLE

Value:
u'%(title)s every other %(dayName)s at %(startTime)s %(timezone)s'

BTU_TITLE

Value:
u'%(title)s every other %(dayName)s from %(startTime)s - %(endTime)s %\
(timezone)s until %(recurrenceEndDate)s'

BTUX_TITLE

Value:
u'%(title)s every other %(dayName)s at %(startTime)s %(timezone)s unti\
l %(recurrenceEndDate)s'

BTL_TITLE

Value:
u'%(title)s at %(location)s every other %(dayName)s from %(startTime)s\
 - %(endTime)s %(timezone)s'

BTLX_TITLE

Value:
u'%(title)s at %(location)s every other %(dayName)s at %(startTime)s %\
(timezone)s'

BTUL_TITLE

Value:
u'%(title)s at %(location)s every other %(dayName)s from %(startTime)s\
 - %(endTime)s %(timezone)s until %(recurrenceEndDate)s'