Skip to content

Instantly share code, notes, and snippets.

@ysubach
Created August 23, 2017 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ysubach/646ff6f744b367321476cffad5a63abe to your computer and use it in GitHub Desktop.
Save ysubach/646ff6f744b367321476cffad5a63abe to your computer and use it in GitHub Desktop.
reply_prefix for alot
# Reply prefix hook for "alot" -- Terminal-based Mail User Agent
#
# place this function into ~/.config/alot/hooks.py
# it creates nice prefix that matches one produced by Gmail and others
def reply_prefix(realname, address, timestamp, ui=None, dbm=None):
sender = ''
if realname and len(realname.strip()) > 0:
sender += realname + ' '
sender += '<'+address+'>'
return 'On {}, {} wrote:\n'.format(timestamp, sender)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment