Been searching the Forums and while this question has been asked and answered my specific problem isn't among the fixes sadly.
I am working in a SCADA system so System.Web.Mail. commands are all I have available to use.
' are remarked out lines that I have tried already.
Here is what I have the mail sends fine but no attachment;
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;