Solved

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

Posted on 2004-09-06
14
335 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

756 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