Link to home
Start Free TrialLog in
Avatar of nbanyan
nbanyanFlag for United States of America

asked on

linking the html <img> tag to an attachment in the newsletter

I've seen this done in other newsletters. I'd like to have the html newsletter refer to the attachments so that it can be viewed correctly offline and so I don't have to store all the newsletter pictures on my website. Anyone here know the coding for this?
Avatar of mxave
mxave

Actually, you don't need to know any script for this. If you use microsoft publisher, you can done this on the fly. You can insert or paste any image into your file and then send it directly from the publisher. Readers will then able to see your images offline after receiving it.

Another way is to convert your newsletter into Adobe PDF Format, so wha you need to do is just convert your newsletter into pdf and then send it as attachment. Even if you think Adobe Acrobat is too expensive, you can find free PDF convertors on the internet.

Hope this two solutions will solve your problem, let me know if you still have problem.
Just put the image inside anchor tags...
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_imglink

I your case the href would link to newsletter.pdf or newsletter.doc or whatever.
Assuming you're having the user download all the images and attachments to a folder, your anchor tags would look like this:

<a href="MyDoc.doc">Click Me</a>

or if they were in a folder somewhere, you'd have:

<a href="MyFolder/MyDoc.doc">Click Me</a>

or

<a href="MyFolder/MyPicture.jpg">Click Me</a>

or whatever file or folder location you set up.

Hope this helps.

Jeff
Avatar of nbanyan

ASKER

I've placed a copy of one of the newsletter's on my web site at http://nbanyan.esmartweb.com/newsletter.html

The newsletter I saw this on was a rafting copany newsletter and their image tags under the "View Source" looked like this:
<img src="attach.pl/uid=5020676321&amp;pn=2&amp;noInline=0&amp;folder=INBOX/image001.jpg" title="http://www.blueskyoutfitters.com">

I do not want to use Microsoft Publisher or Front Page or the like because they automaticly add to much and I want to be able to easlily tweek it and know it will react precisely how I want it to.
Yes, I typed out the entire code in the newsletter.html by notepad :-] )

Do you know how Publisher does this? What is the tag coding that it uses? Maybe that will help.

(This should work without any effort or file moving by the customer)
Avatar of nbanyan

ASKER

Oh, and the src value in the blueskyoutfitters.com newsletter changes when the email is moved to a differant email folder.  ( I use a web based email, but I assume this technique (however it is implimented) works offline with email apps like Outlook.
If you want an image to link to another location, you do something like this:

<img src="MyImage.jpg" onClick="JavaScript:window.location.replace('http://www.gohere.com');">

or if you want to redirect to another page on the same site, you can do this:

<img src="MyImage.jpg" onClick="JavaScript:window.location.replace('MyPage.asp');">

You can also have your image in a different location by changing the src part, like this:

<img src="../MyFolder/MyImage.jpg" onClick="JavaScript:window.location.replace('MyPage.asp');">

This allows the user to click on the image and use it like a link.  You can have your ASP determine where the user will be sent without much trouble.

Jeff
Avatar of nbanyan

ASKER

What I'm looking for is how to tell the html code to look at wherever the attachments are stored in the email.  The images that are part of the html email would be the attachments on the email instead of being stored in a static place eather on the computer or on the internet.
I guess I don't follow.  You're trying to link an image to another point in the same email?  For example, if you click on the image, it will take you to the bottom of the page?  Maybe some further explaination of how you're going to organize this email would help us figure this out.

Jeff
Avatar of nbanyan

ASKER

You've probly all seen newsletter (or other)  html emails with thier pictures and all.  Most of the ones I've seen have the src of the <img> tag point to a location on the internet (ex. <img src="http://nbanyan.esmartweb.com/newspics/sub.jpg>).  On one of the newsletters I've recieved reciently, I saw that they had all their pictures as email attachments and somehow the images in their html newsletter had these as their src instead of a static location like shown above.  I'm wanting to know how they did that. And I want to do it using notepad as my editor.
It's been over a month since anyone posted to this question.  Is the issue resolved?
Avatar of nbanyan

ASKER

No.
mxave seemed to have the right idea, but I don't have publisher (would prefer notepad anyway), but I'd like to see how publisher codes it's emails to do this.
ASKER CERTIFIED SOLUTION
Avatar of joeposter649
joeposter649

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nbanyan

ASKER

Ok, it looks like this will be a little more complex then I thought.  I'll have to find a way to learn and test Mime/mhtml.

Thank you for your help.