I suspect your problem is some misunderstanding of attachments. The word "attachment" is a kind of misnomer: nothing is actually "attached" to anything, so all your concerns about path names and original file locations are simply irrelevant. In fact, what they call "attachment" is merely the part of a
multipart mail, which is nothing but a block of text. An "attached" file is simply embedded inside this text block, most typically in base64 form.
Please see:
http://en.wikipedia.org/wiki/Email_attachment[
^],
http://en.wikipedia.org/wiki/Base64[
^].
Here is the .NET class you can use with
System.Net.Mail.MailMessage
, complete with some code sample:
http://msdn.microsoft.com/en-us/library/system.net.mail.attachment.aspx[
^].
—SA