Solved

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

Posted on 2004-09-06
14
337 Views
Last Modified: 2008-03-06
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?
0
Comment
Question by:nbanyan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 2
  • +1
14 Comments
 

Expert Comment

by:mxave
ID: 11994100
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.
0
 
LVL 15

Expert Comment

by:joeposter649
ID: 11997673
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.
0
 
LVL 9

Expert Comment

by:jmanGJHS97
ID: 12000335
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
0
Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

 

Author Comment

by:nbanyan
ID: 12033529
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)
0
 

Author Comment

by:nbanyan
ID: 12033552
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.
0
 
LVL 9

Expert Comment

by:jmanGJHS97
ID: 12034323
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
0
 

Author Comment

by:nbanyan
ID: 12040194
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.
0
 
LVL 9

Expert Comment

by:jmanGJHS97
ID: 12040298
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
0
 

Author Comment

by:nbanyan
ID: 12040457
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.
0
 
LVL 9

Expert Comment

by:jmanGJHS97
ID: 12286777
It's been over a month since anyone posted to this question.  Is the issue resolved?
0
 

Author Comment

by:nbanyan
ID: 12294811
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.
0
 
LVL 15

Accepted Solution

by:
joeposter649 earned 500 total points
ID: 12298685
0
 

Author Comment

by:nbanyan
ID: 12530427
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.
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question