Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
        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')
Ejemplo n.º 4
0
        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')