public static bool IsValidCvFile(this InboundAttachment attachment) { var names = attachment.InboundEmail.SenderName.ToLower().Split(new[] { ' ', '-' }, StringSplitOptions.RemoveEmptyEntries); var file = attachment.OriginalFileName.ToLower(); return(file.Contains("cv") || file.Contains("resume") || file.Contains("vitae") || file.Contains("curricu") || names.Any(name => file.Contains(name.Trim()))); }
public static bool IsWordDocument(this InboundAttachment attachment) { switch (attachment.FileType) { case "DOC": case "DOCX": return(true); } return(false); }
public static bool IsPdfDocument(this InboundAttachment attachment) { return(attachment.FileType == "PDF"); }