def addMaiStamp(item): ms = MailStamp(item) ms.add() ms.subject = uw("Test Mail") ms.body = uw("Test ") * 60 toAddr = EmailAddress.getEmailAddress(view, "*****@*****.**") ms.toAddress.append(toAddr) ms.fromAddress = EmailAddress.getEmailAddress(view, "*****@*****.**") ms.ccAddress.append(ms.fromAddress) org = EmailAddress.getEmailAddress(view, "The Management") ms.originators.append(org) return ms
item = getattr(item, 'inheritFrom', item) if item.displayName and len(item.displayName.strip()): # The displayName will contain the ics summary icsSummary = item.displayName if item.body and len(item.displayName.strip()): # The body will contain the ics description icsDesc = item.body if not has_stamp(item, MailStamp): if has_stamp(item, EventStamp): EventStamp(item).addStampToAll(MailStamp) else: ms = MailStamp(item) ms.add() mailStamp = MailStamp(item) mailStamp.fromEIMML = False return (mailStamp, icsDesc, icsSummary) return None def buildBody(bodyBuffer): if len(bodyBuffer.get('plain')): body = removeCarriageReturn(u"\n".join(bodyBuffer.get('plain'))) elif len(bodyBuffer.get('html')): htmlBuffer = bodyBuffer.get('html')