【发布时间】:2019-09-18 20:28:36
【问题描述】:
一直在搜索论坛,虽然有人提出并回答了这个问题,但遗憾的是,我的具体问题不在修复之列。
我在 SCADA 系统中工作,所以 System.Web.Mail。命令是我可以使用的全部。
' 是我已经尝试过的行。
这是我的邮件发送正常,但没有附件;
Dim Day as System.dateTime;
Dim sDay as String;
'Dim attachment as System.Web.Mail.MailAttachment;
'Dim attachment as string;
Day = new system.dateTime();
Day = now();
Day = system.dateTime.Parse(Day).AddDays(-1);
sDay = Day.day;
System.Web.Mail.SmtpMail.SmtpServer = "smtp.mdu.com";
System.Web.Mail.MailAttachment("G:\Test\" + me.IGCFilename + sday + ".txt");
'System.Web.Mail.MailAttachment attachment = new System.Web.Mail.MailAttachment("G:\Test\" +
me.IGCFilename + sday + ".txt");
System.Web.Mail.SmtpMail.Send
(
{from: } "DoNotReply@cngc.com;",
{to: } me.EmailTo,
{subject: } "Daily Gate Volumes sent to Williams",
{body: } "Gas Day Volumes"
);
me.EmailFileNow = false;
【问题讨论】:
-
您将附件添加到电子邮件的哪个位置?
-
我认为第二个 system.web,,, 应该是添加附件。
-
我确实尝试过那个帖子,但它使用的是 system.net.mail,而我的 SCADA 系统没有理解它,
-
为什么这个问题用 C# 标记?