473,395 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Dynamically add XML as an attatchment from Stream

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!!

Oct 4 '06 #1
0 965

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris Fink | last post by:
I am receiving xml documents from a customer without a reference to a doctype. I know what the Doctype DTD should be need to insert the declaration as follows <?xml version="1.0"...
5
by: nmtoan | last post by:
Hi, I could not find any answer to this simple question of mine. Suppose I have to write a program, the main parts of it are as follows: #include <blahblah.h> struct {
0
by: Niklas | last post by:
Hi I have no problem downloading an image with Web Services Enhancements and the DIME specification, but how do I dowwnload an application? Regards /Niklas Web service: <WebMethod()> _...
2
by: Raed Sawalha | last post by:
I have seen on some websites, image references that instead of image, are other ASP, ASP.NET or CGI pages. The link would be like <img src="imagegenerator.asp?imageid=1235">. I would like to use...
9
by: Yama | last post by:
Hi, How can I dynamically embed the content of a filename.js into a .aspx page before rendering it to the client? Thanks, ~yamazed
11
by: skumar434 | last post by:
Hi everybody, I am faceing problem while assigning the memory dynamically to a array of structures . Suppose I have a structure typedef struct hom_id{ int32_t nod_de; int32_t hom_id;
1
by: swedtex | last post by:
When I attempt to open a regular mail attachment, suddenly, Powerpoint is activated, and all is messed up, in regards to the original attatchment. Platform XP. Suggestion to solve the issue? ...
1
by: =?Utf-8?B?QWRhbQ==?= | last post by:
I'm having a problem loading an Icon into an ImageList. When I load the icon directly it works fine, like this: Icon sourceIcon = << Get an icon from somewhere... >>;...
7
by: chage | last post by:
Hi, I have been searching around to try adding reference assembly to another assembly during runtime, programatically. Is this possible in .Net? The reason for this is because i am having...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.