Moved calls around in the function sendgridit in com_mailer and added pines_log for error messages