Allura/allura/tasks/mail_tasks.py
def sendsimplemail(
        fromaddr,
        toaddr,
        text,
        reply_to,
        subject,
        message_id,
        in_reply_to=None,
        sender=None,
        references=None,
        cc=None):
    '''
    Send a single mail to the specified address.
    It is best for single user notifications.

    :param fromaddr: ObjectId or str(ObjectId) of user, or email address str
    :param toaddr: ObjectId or str(ObjectId) of user, or email address str

    '''
    from allura import model as M
    if fromaddr is None:
        fromaddr = g.noreply
    elif not isinstance(fromaddr, basestring) or '@' not in fromaddr:
        log.warning('Looking up user with fromaddr: %s', fromaddr)
        user = M.User.query.get(_id=ObjectId(fromaddr), disabled=False, pending=False)
        if not user:
            log.warning('Cannot find user with ID: %s', fromaddr)
            fromaddr = g.noreply
        else:
            fromaddr = user.email_address_header()

    if not isinstance(toaddr, basestring) or '@' not in toaddr:
        log.warning('Looking up user with toaddr: %s', toaddr)
        user = M.User.query.get(_id=ObjectId(toaddr), disabled=False, pending=False)
        if not user:
            log.warning('Cannot find user with ID: %s', toaddr)
            toaddr = g.noreply
        else:
            toaddr = user.email_address_header()

    htmlparser = HTMLParser.HTMLParser()
    plain_msg = mail_util.encode_email_part(htmlparser.unescape(text), 'plain')
    html_text = g.forge_markdown(email=True).convert(text)
    html_msg = mail_util.encode_email_part(html_text, 'html')
    multi_msg = mail_util.make_multipart_message(plain_msg, html_msg)
    smtp_client.sendmail(
        [toaddr], fromaddr, reply_to, subject, message_id,
        in_reply_to, multi_msg, sender=sender, references=references, cc=cc, to=toaddr)

    Send a single mail to the specified address.
    It is best for single user notifications.

    :param fromaddr: ObjectId or str(ObjectId) of user, or email address str
    :param toaddr: ObjectId or str(ObjectId) of user, or email address str

    
Send a single mail to the specified address.
It is best for single user notifications.
Send a single mail to the specified address . It is best for single user notifications .
def sendsimplemail(
        fromaddr,
        toaddr,
        text,
        reply_to,
        subject,
        message_id,
        in_reply_to=None,
        sender=None,
        references=None,
        cc=None):
    from allura import model as M
    if fromaddr is None:
        fromaddr = g.noreply
    elif not isinstance(fromaddr, basestring) or '@' not in fromaddr:
        log.warning('Looking up user with fromaddr: %s', fromaddr)
        user = M.User.query.get(_id=ObjectId(fromaddr), disabled=False, pending=False)
        if not user:
            log.warning('Cannot find user with ID: %s', fromaddr)
            fromaddr = g.noreply
        else:
            fromaddr = user.email_address_header()
    if not isinstance(toaddr, basestring) or '@' not in toaddr:
        log.warning('Looking up user with toaddr: %s', toaddr)
        user = M.User.query.get(_id=ObjectId(toaddr), disabled=False, pending=False)
        if not user:
            log.warning('Cannot find user with ID: %s', toaddr)
            toaddr = g.noreply
        else:
            toaddr = user.email_address_header()
    htmlparser = HTMLParser.HTMLParser()
    plain_msg = mail_util.encode_email_part(htmlparser.unescape(text), 'plain')
    html_text = g.forge_markdown(email=True).convert(text)
    html_msg = mail_util.encode_email_part(html_text, 'html')
    multi_msg = mail_util.make_multipart_message(plain_msg, html_msg)
    smtp_client.sendmail(
        [toaddr], fromaddr, reply_to, subject, message_id,
        in_reply_to, multi_msg, sender=sender, references=references, cc=cc, to=toaddr)
def sendsimplemail ( fromaddr , toaddr , text , reply_to , subject , message_id , in_reply_to = None , sender = None , references = None , cc = None ) : from allura import model as M if fromaddr is None : fromaddr = g . noreply elif not isinstance ( fromaddr , basestring ) or '@' not in fromaddr : log . warning ( 'Looking up user with fromaddr: %s' , fromaddr ) user = M . User . query . get ( _id = ObjectId ( fromaddr ) , disabled = False , pending = False ) if not user : log . warning ( 'Cannot find user with ID: %s' , fromaddr ) fromaddr = g . noreply else : fromaddr = user . email_address_header ( ) if not isinstance ( toaddr , basestring ) or '@' not in toaddr : log . warning ( 'Looking up user with toaddr: %s' , toaddr ) user = M . User . query . get ( _id = ObjectId ( toaddr ) , disabled = False , pending = False ) if not user : log . warning ( 'Cannot find user with ID: %s' , toaddr ) toaddr = g . noreply else : toaddr = user . email_address_header ( ) htmlparser = HTMLParser . HTMLParser ( ) plain_msg = mail_util . encode_email_part ( htmlparser . unescape ( text ) , 'plain' ) html_text = g . forge_markdown ( email = True ) . convert ( text ) html_msg = mail_util . encode_email_part ( html_text , 'html' ) multi_msg = mail_util . make_multipart_message ( plain_msg , html_msg ) smtp_client . sendmail ( [ toaddr ] , fromaddr , reply_to , subject , message_id , in_reply_to , multi_msg , sender = sender , references = references , cc = cc , to = toaddr )
Send a single mail to the specified address.
Send a single mail to the specified address .
'''
    Send a single mail to the specified address.
    It is best for single user notifications.

    :param fromaddr: ObjectId or str(ObjectId) of user, or email address str
    :param toaddr: ObjectId or str(ObjectId) of user, or email address str

    '''
fromaddr
ObjectId or str(ObjectId) of user, or email address str
ObjectId or str ( ObjectId ) of user or email address str
toaddr
ObjectId or str(ObjectId) of user, or email address str
ObjectId or str ( ObjectId ) of user or email address str
text
reply_to
subject
message_id
in_reply_to
sender
references
cc