Fixed email sending script