solve bug in mail script

Signed-off-by: Karel Kellner <karel@kellner.be>