Fix mailing script, debugging