Click to See Complete Forum and Search --> : HTML Embedded in a email


dcjones
04-28-2003, 10:55 AM
Hi All,

May be I should know how to do this, but, well I don't. Can you help.

I want to know how I can send an email to a customer. When the customer opens the mail it auto opens a page on my website.

If you an help please write slowly.


Many thanks


Dereck

Decaff
04-28-2003, 12:08 PM
dcjones,


It's actually a fairly straight proposition...
in order to have your site appear in the body of the email you will need to compose in the email client's composer program so that the html code get's embedded in the email...

Use absolute href's to accomplish this...

One way to accomplish what you want is to open your graphics program (Photoshop, Fireworks, Illustrator) and create a new graphic that represents your site's logo (or just use your existing) ...
Save this file in a place where you will be able to find it...

Open your email client and open a "new email" this puts you in composer mode...

Look just below the "subject" line and you will see some references to formatting tools...text/size/styles/colors and over on the far right side you will see several icons...start with the "insert Picture" icon and then you will be able to create a hyperlink from there...

You can click on the graphic icon and a small dialogue box will open...you can then navigate to your images folder and pull up the new image you created your logo or whatever...
Once that is embedded in the email you con double click on it and you then click on the small "create a hyperlink" icon next to the "insert picture" icon and a small dialogue box will open ..just insert your full url string (the box supplies you with the http:// part...press "ok" and you are off and running...
You could surround this with promotional material if you like but most importantly people will be able to click on a representation of your site and then go to whichever url you point them to...this could be your main index page or a special promotional page you have set up for tracking purposes..

hope this anwsers your question and help you along...:cool:

Decaff
04-28-2003, 02:16 PM
dcjones,


Now if you want to pull in one of your pages when the individual opens their email...then this is a different beast, altogether...

The best way to discover this instead of me chocking up webdeveloper.com's resources with a bunch of code is this:
Next time you receive an email that loads in a web page inside your email client....do this...
In your email client where you see the "subject/from/date" information (normally you have to click on this to open an email)...highlight the reference to the email that has just loaded a web page and right click on it ....this opens a fairly lengthy dialogue box with all sorts of options...you are only interested in the last one...go down to the bottom of the menu and click on "properties"...this will open a small dialogue box....you should see a General Tab (default) and a Details Tab...click on the Details Tab and then look for the "Message Source" button...click on this and you will see a box that shows the source code for that particular email...maximize this box and all the information about this particular email will be available for you to review...and more importantly...learn from...

You can do this with any email message you receive and you will quickly be able to reverse engineer the process...
Absolute hrefs is one key component in the process as well as <img src=""> with absolute href's ....pulling in graphics from a site ...

Good luck...

dcjones
04-28-2003, 03:32 PM
Hello Decaff,

I must thank you for such a great answer to my problem.

I know that following your replies I will solve it.

I would just like to say that this is the very best answer to any question I have posted on any forum.

The detail you have gone into shows what a professional you are.

Many thanks and kind regards


dereck

dcjones
04-29-2003, 05:04 AM
Hello Decaff,

I have with sucess managed to completd the task using your
reply by placing info and graphic into a emal doc. Thank you.

I still have a problem. Your second reply. I have had a look at the source code for a mail I recieved with HTML embedded within it. All I see is the HTML code which is what I would expect to see. I have looked at this code over and over and there is no reference to how the code is embedded or how it links back to a webpage. Can you help on this if you have time. Your last answers were so good.


Thanks in advance

Dereck

Decaff
04-29-2003, 01:21 PM
Dcjones,

I should have been a little more specific regarding the second response. If you take a look at that email source code again...the clue is going to be in the header section of the email source code...here's an example:


Return-Path: <1.11899.34323332323636.1.b@ientrymail.com>
Received: from mtiwgwc18.worldnet.att.net ([127.0.0.1])
by mtiwgwc18.worldnet.att.net
(InterMail vM.5.01.05.12 201-253-122-126-112-20020820)
with ESMTP
id
for xxxxxxxxxxxxxxxxxx
Tue, 29 Apr 2003 15:05:59 +0000
Tue, 29 Apr 2003 15:05:59 +0000
Message-ID: <1174081.1051630056378.JavaMail.root@agent3.
ientrymail.com>
Date: Tue, 29 Apr 2003 11:27:36 -0400 (EDT)
From: DevWebPro <1.11899.34323332323636.1@ientrymail.com>
To: xxxxxxxxxxxxxxxxxxx
Subject: What If Your Company Lost All of its Data Tomorrow
Mime-Version: 1.0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Mailer: Accucast (http://www.accucast.com)
X-Mailer-Version: 2.8.6-4


I bump out some long text strings because it forces the browser to go to horizontal scroll..don't want that...

I have blocked out my email address...but what you want to see is that this email is sent by an email broadcast service called Accucast...this simple means that in order for an email client (Explorer, Navigator, Opera) to open an email and then pull in a web page the email source has to be encoded properly in the head of the email so that the email client will know how to respond to the email...just open in window or open in window and pull in web page...

So if you are running a dedicated server (or perhaps a shared resource) you may be able to tap into your own resources via the server's email server functions (beware...most ISP's are very cautious on this point....they don't want every web site they host to be able to broadcast bulk email..this would be a nightmare on resources and liabilities)...


You would have to dialogue with your ISP in order to better understand your options...but chances are they will have already figured out a fee structure for email broadcasting or can recommended a trusted service provider..

I hope this helps...now it's back to work for me...

Decaff
05-02-2003, 02:41 PM
Dereck,

Just wondering if you managed to get your email sends working properly so that when one of your customers (prospective customer or established) opens one of your emails it "pulls" in the page you want them to see?

Just checking in ... let me know...thanks

tmakhani
08-04-2005, 11:11 AM
I have the following java code:

mesg = new MimeMessage(session);
mesg.addRecipient(Message.RecipientType.TO, new InternetAddress(messageTo));
mesg.setSubject(subject);
mesg.setText(body);

How do I make the text to appear as HTML vs plain text?

Thanks