added content type to mailer and updated the contitions for sending email