473,778 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

>> Questions about Flow: XML -> Send to Friend

Hey everyone,

I have a simple task. I want to take an XML file, pull out the
elements in it, format them, and then send an html email based on it.
What are the necessary steps? Any suggestions? I know how to write XSL
style sheets. Most of my confusion lays in how to get the XML elements
for matted and the transformed in such a form that is email-able.
Thank you so much!
Jul 20 '05 #1
3 1760
Gene Ellis (ge********@uco p.edu) wrote:
: Hey everyone,

: I have a simple task. I want to take an XML file, pull out the
: elements in it, format them, and then send an html email based on it.
: What are the necessary steps? Any suggestions? I know how to write XSL
: style sheets. Most of my confusion lays in how to get the XML elements
: for matted and the transformed in such a form that is email-able.
: Thank you so much!

This is a two step job.

First step is to create the text/plain and-or text/html sections. Ignore
all issues of mail formatting at this stage. This is a standard xml/xsl
process. Create the data as xml. Use xlst to pull out the things you
want and format them the way they should eventually be seen. Save the
result in one or more files (one file per format, e.g. if the mail should
have a text/plain section and a text/html section then format then there
will be two files produced).
Second step is to pack the files into a mail message. You could probably
use a stylesheet for that, but why bother? Use a mail or mime tool to
bundle the parts together. I have used perl MIME::Lite, but there are
numerous other tools available.
--

(Paying) telecommute programming projects wanted. Simply reply to this.

Jul 20 '05 #2
Gene Ellis wrote:
Hey everyone,

I have a simple task. I want to take an XML file, pull out the
elements in it, format them, and then send an html email based on it.
What are the necessary steps? Any suggestions? I know how to write XSL
style sheets. Most of my confusion lays in how to get the XML elements
for matted and the transformed in such a form that is email-able.
Thank you so much!


If you use unix/linux:
* Use xslt to convert the xml file to "hmtl file" (xml -> html) and "email
headers file" (xml -> plain text). You can use two xsl files or xslt processor
capable to produce more than one output file.
* Use the command below to send the files
( cat msg.hdr; echo ; cat msg.html) | sendmail -oi -t

-t - will make sendmail (or MTA pretending to be sendmail) to get recipient
addresses from headers

Recomended headers in msg.hdr:
subject,from,to (OR cc OR bcc),
Content-Type (text/html),Content-Transfer-Encoding (8bit),MIME-Version (1.0).

--
Andrzej [en:Andrew] Adam Filip an**@priv.onet. pl an**@xl.wp.pl
http://anfi.homeunix.net/ http://slashdot.org/~anfi
*Random Epigram* :
English is an obsolete name. We speak usanesse.
-- 2004

Jul 20 '05 #3
What operating system are you on and what tools are you wanting to use?

Why can't you do a transform and send a message formated in html (xhtml)?
Jul 20 '05 #4

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

Similar topics

1
3496
by: Xah Lee | last post by:
with strict HTML spec, can one have <p> tags inside table's <td> tag? also, in strict XHTML, can one have <p> tages inside <div>? Thanks. Xah xah@xahlee.org ∑ http://xahlee.org/
3
1500
by: TJ | last post by:
Hi, I've been referring to many codes and books and always see that the stream insertion operators are overloaded as friends. Why is that? Are there any other overloading that need the same type of specification, as friends in the class that will use them? Thanks, TJ
4
1559
by: Ook | last post by:
I'm a but fuzzy about this. You would call it like this:Polynomial poly; // Polynomial is my class with various properties cin >> poly; In the function itself, I would, for example, do the following: istream& operator>>(istream& is, Polynomial& poly) { is >> poly._size; is >> poly._coefficient;
1
2071
by: Henk | last post by:
I have to do some technical documentation for a client. The application that needs to be documented is an Ms Access one. One of the things I want to do is make an overveiw of the so-called form flow. Is there a way to import the formnames in one go and display them as a shape (each form a shape). Is there a way to import a list from a table and display them as shapes? Many thanks in advance, Henk
2
2182
by: PawelR | last post by:
Hello Group, I've two questions. 1. How send fax from my apps? After OnClick button fax must be send, without question to user (backword application). 2. How send fax from command line? Thx PawelR
0
903
by: G | last post by:
In IE you can File, Send, Page By Email, and I was wondering if there was a way to do this in ASP.NET. I'm creating a number of reports and I would like to replicate what IE does with a link or button. Ok maybe I would like to do a little more then what the IE does. It would be nice to populate the subject field and in the message say something like "Html report attached" Thanks,
0
1015
by: karenkksh | last post by:
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="CatHeader"><td>&nbspSourcing Selection<br></td></tr> <tr class="filter"><td><a href="SourcingBroker.asp?tier=tier 1&pro=<%=pro%>&email=<%=email%>&rt=<%=rt%>"><font class="pageLink">&gt&gt Send to Brokers - Tier 1</font></a></td></tr> <tr class="filter"><td><a href="SourcingBroker.asp?tier=tier 2&pro=<%=pro%>&email=<%=email%>&rt=<%=rt%>"><font...
0
863
by: karenkksh | last post by:
-------------------------------------------------------------------------------- <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="CatHeader"><td>&nbspSourcing Selection<br></td></tr> <tr class="filter"><td><a href="SourcingBroker.asp?tier=tier 1&pro=<%=pro%>&email=<%=email%>&rt=<%=rt%>"><font class="pageLink">&gt&gt Send to Brokers - Tier 1</font></a></td></tr> <tr class="filter"><td><a...
3
1088
by: gudipati | last post by:
hi to all may i know which site is better to prepare interview for .net
0
9629
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10298
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8957
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7475
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5500
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.