c# - getting the path of a MailMessage attachment -


i'm using mailmessage queue , upon exiting program want save content of queue.

i created temp list , pass contents of queue that. after use simple streamwriter write each info out.

the thing can't seem path of attachment. far know can't save out mailmessages thought work well, if there simpler/different solution that's great.

list<mailmessage> temp = queue.tolist<mailmessage>(); stream stream = file.open("queue" +".osl", filemode.create); streamwriter s = new streamwriter(stream); foreach (mailmessage x in temp) {     s.writeline(x.from.address + x.to[0].address + x.body + x.subject + x.attachments[0].name); } s.close(); stream.close(); 

you can use:

path.getfullpath(x.attachments[0].name); 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -