Hello,
Yes, this should be possible to accomplish. Please visit the following section of developer’s guide to find instructions on how you can shedule a custom code:
Scheduling a custom code.
You will need to generate this excel file at first. You can find inspiration how to accomplish it in the following file:
~\CMSModules\BizForms\Tools\BizForm_Edit_Export.aspx.csTo send the email you can use
EmailSender.SendEmail(EmailMessage) method:
using CMS.EmailEngine;
EmailMessage msg = new EmailMessage();
msg.EmailFormat = EmailFormatEnum.Both;
msg.From = "test@kentico.com";
msg.Recipients = "support@kentico.com";
msg.Subject = "support";
EmailSender.SendEmail(msg);
The
EmailMessage class provides also a property called
Attachments that is standard
AttachmentCollection.
Best regards,
Michal Legen