U
UnglueD
Hello.
I've written an application that sends an email when complete. I
wish to attach an XML document with any custom errors that the program
encountered.
Initially I have done this:
If orderErrors.count > 0 Then
w = New StreamWriter(orderFile)
s.Serialize(w, orderErrors)
w.Close()
mail.Attachments.Add(New Attachment(orderFile))
End If
Where orderErrors is an Object which contains an XML serializable
array of error messages. It serializes fine and I have gotten it to
output to an absolute path on the filesystem. Then I attatch it to the
email to be sent.
What I would like to do is skip outputing it to an actual XML file on
the filesystem, and serialize it to a stream (which the Attatchments
framework allows) and send it.
I wish to do this because, I wish to publish just the .exe and have
it be used on different machines who will not have this directory
structure setup.
Thanks in advance!!
I've written an application that sends an email when complete. I
wish to attach an XML document with any custom errors that the program
encountered.
Initially I have done this:
If orderErrors.count > 0 Then
w = New StreamWriter(orderFile)
s.Serialize(w, orderErrors)
w.Close()
mail.Attachments.Add(New Attachment(orderFile))
End If
Where orderErrors is an Object which contains an XML serializable
array of error messages. It serializes fine and I have gotten it to
output to an absolute path on the filesystem. Then I attatch it to the
email to be sent.
What I would like to do is skip outputing it to an actual XML file on
the filesystem, and serialize it to a stream (which the Attatchments
framework allows) and send it.
I wish to do this because, I wish to publish just the .exe and have
it be used on different machines who will not have this directory
structure setup.
Thanks in advance!!