Solved

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

Posted on 2004-09-06
14
326 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
  • 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Read about why website design really matters in today's demanding market.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now