Indy10 Attachment?

Giganews Newsgroups
Subject: Indy10 Attachment?
Posted by:  William Stacey (stace…@mvps.org)
Date: Wed, 11 Feb 2004

I am using Indy for first time with c# on .Net.  Can't seem to figure out
how to add an attachment.
Have seen references to "TIdAttachment", but I don't see that in the
library.  TIA

try
{
Indy.Sockets.IndyMessage.Message msg = new
Indy.Sockets.IndyMessage.Message();
msg.UseNowForDate = true;
string enc = msg.AttachmentEncoding;
Console.WriteLine("encoding:"+enc);

msg.From.Address = from;
msg.Recipients.EMailAddresses = to;
msg.Subject = subject;
msg.Body.Text = message;

smtp.Connect();
smtp.Send(msg);
smtp.Disconnect();
return true;
}

--
William Stacey, MVP

Replies