Reputation: 426
I am currently having an issue where I am creating a MailMessage with attachments. This works perfectly well on a local server, however once it is moved to a remote server, the application is unable to find the files that were attached. The code I am using is:
foreach (string s in e.attachments)
{
mail.Attachments.Add(new Attachment(s));
}
Where e.attachments is simply a List<string>
of paths to files on the client's computer.
The error message I am receiving is:
I'm assuming this is happening because the application is looking at the C: drive of the server it is running on. How would I go about solving this issue?
Upvotes: 0
Views: 158