This is more C# based than just a Selenium question.
There is an entire website devoted to explaining, in detail, how to send an email using C# and the System.Net.Mail namespace:
http://www.systemnetmail.com/
A simple example:
using System.Net;
using System.Net.Mail;
var fromAddress = new MailAddress("[email protected]", "From Name");
var toAddress = new MailAddress("[email protected]", "To Name");
string fromPassword = "fromPassword";
string subject = "Subject";
string body = "Body";
var smtp = new SmtpClient
{
Host = "smtp.gmail.com",
Port = 587,
EnableSsl = true,
DeliveryMethod = SmtpDeliveryMethod.Network,
UseDefaultCredentials = false,
Credentials = new NetworkCredential(fromAddress.Address, fromPassword)
};
using (var message = new MailMessage(fromAddress, toAddress)
{
Subject = subject,
Body = body
})
{
smtp.Send(message);
}
All you would need to do is construct the message body by reading in the contents of the 'reports' you mentioned about.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…