Add basic email validation. Improve error messages. Handle empty attachment strings.