I create a eml file from MailMessage and SMTPdeliverymethod.specifiedpickupdirectory
But To save it, I need to fill TO and FROM field. But In fact I don't need them. Is It possible to save mailMeassge without them? Or I try to create a new eml file like here
dim sr as new io.streamreader(Path)
dim sw as new streamwriter(io.Path.combine(io.path.getdirectoryname(Path),"modified.eml")
dim line as string= sr.readline
while line <> nothing
if not line.startswith("X-Sender:") andalso line.startswith("X-Receiver:") Andalso line.startswith("From:") andalso line.startswith("To:") thensw.writeline(line)
line=sr.readline
end while
sw.flush
sw.close
But my new file isn't full. I lost my attachments and others lines
How can I have an eml file without from and To. When I want to open, I can fill myself. Or About From field : is it possible to say to take default account of outlook, when user click on it?