Gmane
From: McCormack, Chris <Chris.McCormack <at> littlewoods.co.uk>
Subject: RE: Embed picture in HTML email
Newsgroups: gmane.comp.jakarta.taglibs.user
Date: 2004-04-06 07:56:05 GMT (5 years, 12 weeks, 6 days, 2 hours and 42 minutes ago)
Its pretty simple from the docs included with mailer taglib but, heres how it works with some examples :

First page is a simple html:form that collects the data. The javascript:validate() method on that page
forwards on to another html page (the page that goes in to the body of your html email) which has these tags in :

--
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib uri="http://jakarta.apache.org/taglibs/mailer-1.1" prefix="mail" %>
<mail:mail>
<mail:server><c:out value="${mailhost}" escapeXml="false" /></mail:server>
<mail:from>"<c:out value="${sender}" escapeXml="false" />" <<c:out value="${sender}"
escapeXml="false" />></mail:from>
<mail:setrecipient type="to"><c:out value="${recipient}" escapeXml="false" /></mail:setrecipient>
<mail:subject>subject here</mail:subject>
<mail:message type="html">
<html>
  <body> <h1> go go gadget legs </h1>
  </body>
</html>
</mail:message>
<mail:send/>  
</mail:mail>

<c:redirect url="nextPage.do" />

-- 
The user only sees the form page and nextPage.do and recieves a nice big 'go go gadget legs' in their email.

Chris McCormack

-----Original Message-----
From: Edsard Vegter [mailto:EdsardV <at> orderware.net]
Sent: 05 April 2004 21:30
To: Tag Libraries Users List
Subject: RE: Embed picture in HTML email

Hi Chris,

The emails from your web page work great. I still have trouble getting the 
desired result, would you be able to give me some simple sample code??? 

Regards,

Edsard

"McCormack, Chris" <Chris.McCormack <at> littlewoods.co.uk> 
05/04/2004 08:01 p.m.

Please respond to
"Tag Libraries Users List" <taglibs-user <at> jakarta.apache.org>

To
"Tag Libraries Users List" <taglibs-user <at> jakarta.apache.org>
cc

Subject
RE: Embed picture in HTML email

I used the mailer tag lib to generate the email sent from this page :
http://www.index.co.uk/rf/navigation/product.do?SN=&versionid=723&categoryid=149949126&thisprod=179469156&product=179469156&D=189121345

click the button 'e-mail this item to a friend' on the middle right of the 
page and enter your details to
receive the mail. 
It sends html including css and images etc. The trick is to generate a 
normal html page and then send the built page as the body part of the 
mailer tag. 

Chris McCormack

-----Original Message-----
From: Henri Yandell [mailto:bayard <at> generationjava.com]
Sent: 04 April 2004 23:28
To: Tag Libraries Users List
Subject: Re: Embed picture in HTML email

You can't embed pictures in emails. You can have <img src="foo"> etc in
them, but the picture will be obtained from a server of some kind.

Some mail clients [okay, Outlook is the only one I know of] allow for some
proprietary xml-ish tags to be in your emails which will load resources
from attachments.

I usually send from Outlook to Pine to see this, but I'm sure there are
ways to see what the html really looks like in Outlook. Save it or
something. Anyway, you'll see lots of special tags that exist. I've never
really played with them though.

I'd definitely be interested in seeing any info which details the
pseudo-library of extra tags that Outlook converses in, but have never
really gone looking for them. Maybe it's possible to write a Java library
for creating Outlook-HTML pages and then sending it as a mime-type that
only Outlook responds to (?). We could then send 3 versions of every mail,
plain-text, html and outlook-html.

Just some thoughts...

Hen

On Mon, 5 Apr 2004, Edsard Vegter wrote:

> Hi,
>
> Using the JSP mailer tags, I can send an HTML emails. Now I'd like to to
> go one step further and have a picture in the email as well. Is it
> possible to embed a jpg of gif  in the message???  And if so, how do I 
do
> this

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe <at> jakarta.apache.org
For additional commands, e-mail: taglibs-user-help <at> jakarta.apache.org

***********************************************
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.
************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe <at> jakarta.apache.org
For additional commands, e-mail: taglibs-user-help <at> jakarta.apache.org

ForwardSourceID:NT0000293E 

***********************************************
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.
************************************************