My warning - don't do it - Database is great for data manipulation, bad for communication. Some principles are hard to mix inside database. I like a stored procedures, all power of PostgreSQL, but the communication from database was failure early or in long time.
Better to write simple daemon application, that can monitor table with mails and sends mails related to new record there - you can use LISTEN/NOTIFY mechanism for immediate signal from database to application