plsql发送csv附件的代码
时间: 2023-03-10 17:15:21 浏览: 92
你可以使用如下代码来发送csv附件:string fileName = "你的文件名.csv";
string filePath = @"C:\文件路径\" + fileName;using (MailMessage mail = new MailMessage())
{
mail.From = new MailAddress("发件人邮箱");
mail.To.Add("收件人邮箱");
mail.Subject = "主题";
mail.Body = "正文内容"; Attachment attachment = new Attachment(filePath);
mail.Attachments.Add(attachment); SmtpClient smtp = new SmtpClient("SMTP服务器");
smtp.Send(mail);
}
阅读全文