L
Larry Viezel
I have a string:
sring Result = "This is the string I want sent as a text file"
I have MailMessage:
MailMessage TestMail = new MailMessage();
TestMail.From = "(e-mail address removed)";
TestMail.To = "(e-mail address removed)";
TestMail.BodyFormat = MailFormat.Text;
TestMail.Subject = "Test email";
TestMail.Body = "This would be the body of the email"
I want to add Result as a textfile attachement to the email. How can I
go about doing this? I would prefer if I didn't have to actually save
to the disk.
TestMail.Attachments.Add(Result); //obviously this would be too
easy.
SmtpMail.Send(TestMail);
Any thoughts? Can I somehow cast this string into a MailAttachment as
if by magic?
Larry.
sring Result = "This is the string I want sent as a text file"
I have MailMessage:
MailMessage TestMail = new MailMessage();
TestMail.From = "(e-mail address removed)";
TestMail.To = "(e-mail address removed)";
TestMail.BodyFormat = MailFormat.Text;
TestMail.Subject = "Test email";
TestMail.Body = "This would be the body of the email"
I want to add Result as a textfile attachement to the email. How can I
go about doing this? I would prefer if I didn't have to actually save
to the disk.
TestMail.Attachments.Add(Result); //obviously this would be too
easy.
SmtpMail.Send(TestMail);
Any thoughts? Can I somehow cast this string into a MailAttachment as
if by magic?
Larry.