modified send email method and invite email template