i have code that generates a pdf file and i want to send it as an attachment to an email .
I have this code:
FileContentResult fileContentResult = File(fileName, "application/pdf", "file.pdf");
and i have this code to email an attachment
Attachment a = new Attachment();
sender.SendMail("[email protected]", "[email protected]", "subject", "Body", a);
how do i convert a FileContentResult into a Attachment object?