Extract function to create email activity when sending an email to contact