mail.send() is pretty easy. what's the structure of your "mail" table ?
assuming you have a query for mails ready to be sent, e.g. db((db.mails.send_after > request.now) & (db.mails.sent == False)).select() , all that it takes is
all_mails = db((db.mails.send_after > request.now) & (db.mails.sent == False)).select()
for row in all_mails:
row.update_record(row.sent=True)