def send_comment_email(email, package_owner, package_name, commenter):
    """Send email to owner of package regarding new comment"""
    link = '{CATALOG_URL}/package/{owner}/{pkg}/comments'.format(
        CATALOG_URL=CATALOG_URL, owner=package_owner, pkg=package_name)
    subject = "New comment on {package_owner}/{package_name}".format(
        package_owner=package_owner, package_name=package_name)
    html = render_template('comment_email.html', commenter=commenter, link=link)
    body = render_template('comment_email.txt', commenter=commenter, link=link)
    send_email(recipients=[email], sender=DEFAULT_SENDER, subject=subject,
               html=html, body=body)
def send_comment_email ( email , package_owner , package_name , commenter ) : link = '{CATALOG_URL}/package/{owner}/{pkg}/comments' . format ( CATALOG_URL = CATALOG_URL , owner = package_owner , pkg = package_name ) subject = "New comment on {package_owner}/{package_name}" . format ( package_owner = package_owner , package_name = package_name ) html = render_template ( 'comment_email.html' , commenter = commenter , link = link ) body = render_template ( 'comment_email.txt' , commenter = commenter , link = link ) send_email ( recipients = [ email ] , sender = DEFAULT_SENDER , subject = subject , html = html , body = body )
Send email to owner of package regarding new comment