I'm using Rotativa for PDF generation from a .cshtml I can download the file through the application correctly using the command below:
DadosConvite convidado = new DadosConvite();
convidado.nome = "teste";
return new Rotativa.ViewAsPdf("ConvitePDF", convidado) { FileName = "Convite.pdf"};
But I need to send this PDF by email, instead of just making it available to the user.
How can I get the content (byte []) of this PDF to be attached to the email?