如下的代码是关于C#发送带附件的邮件的代码. MailMessage m = new MailMessage();m.Subject = "File attachment!";m.Body = "See the attached file.";m.Attachments.Add(new Attachment(@"C:test.txt"));SmtpClient client = new SmtpClient("smtp.w3mentor
using System; using System.IO; using System.Net; using System.Net.Mail; using System.Net.Mime; using System.Text; public class EmailUitls { /// <summary> /// 发送邮件 /// </summary> /// <param name="fileName">附件路径</param> ///
以Gmail为例.点击屏幕的Capture按钮得到当前屏幕截图,点击Send按钮将之前的截图作为附件发送邮件. using UnityEngine; using System.Collections; using System; using System.Net; using System.Net.Mail; using System.Net.Security; using System.Security.Cryptography.X509Certificates; public class T