473,320 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Embedding images in email.

24
Hi,
I have been searching for hours, but I cant find a decent tutorial on how to embed an image in an email. All I want is to put a header image at the top of the email I am sending out, please can anyone help me on this? All help is greatly appreciated.
Jul 29 '08 #1
11 2570
pbmods
5,821 Expert 4TB
Heya, Miraan.

It's reasonably easy with PHPMailer (http://phpmailer.codeworxtech.com/in...?pg=tutorial#4).
Jul 29 '08 #2
Atli
5,058 Expert 4TB
This is more of a theoretical idea at the moment, as IE seems to have a real problem with this concept, but..

It is possible to embed image data directly into the HTML (assuming you are sending HTML emails).
Like:
Expand|Select|Wrap|Line Numbers
  1. $data = file_get_contents("someimg.png");
  2. $data = base64_encode($data);
  3. echo '<img src="data:image/png;base64,', $data, '" alt="someimg" />';
  4.  
But, like I say, an email client that depends on IE to render HTML would not show this image.
Jul 31 '08 #3
miraan
24
Thanks for all your help!
Aug 5 '08 #4
pbmods
5,821 Expert 4TB
But, like I say, an email client that depends on IE to render HTML would not show this image.
Outlook 2003 uses IE to render HTML.
Outlook 2007 uses Word (don't ask; you won't like the answer).
Aug 5 '08 #5
Atli
5,058 Expert 4TB
Outlook 2003 uses IE to render HTML.
Outlook 2007 uses Word (don't ask; you won't like the answer).
Damn, now I'm curious :P
Aug 6 '08 #6
pbmods
5,821 Expert 4TB
Damn, now I'm curious :P
Okay, you asked for it:

http://www.campaignmonitor.com/blog/..._design_b.html
Aug 6 '08 #7
Atli
5,058 Expert 4TB
Okay, you asked for it:

http://www.campaignmonitor.com/blog/..._design_b.html
You were right, I really don't like that.
And to think, those... people pretty much control how we must design our webs.

I foresee a huge army of angry web-developers tearing down the M$ headquarters.
Aug 6 '08 #8
pbmods
5,821 Expert 4TB
You were right, I really don't like that.
And to think, those... people pretty much control how we must design our webs.

I foresee a huge army of angry web-developers tearing down the M$ headquarters.
Meh. Microsoft gives their customers what they expect. What I'd really like to see is User re-education on a massive scale; if the people that give Microsoft money were to start demanding quality products in exchange, Microsoft would have to shape up or ship out.

I still haven't yet been able to determine the root of this problem, but there is something fundamentally wrong with a person who uses crappy software, acknowledges that it is crappy software... and then refuses to do anything to improve his situation and actively resists the efforts of others to do the same.
Aug 6 '08 #9
Atli
5,058 Expert 4TB
I would guess the problem is money. While Microsoft gets away with shipping crappy software, they will do so. It's cheaper than actually having to fix it.

Until they actually start loosing customers (or rather, money) because of this, they will only fix what is absolutely necessary and resist anything that will cost them extra.
Aug 6 '08 #10
pbmods
5,821 Expert 4TB
I would guess the problem is money. While Microsoft gets away with shipping crappy software, they will do so. It's cheaper than actually having to fix it.

Until they actually start loosing customers (or rather, money) because of this, they will only fix what is absolutely necessary and resist anything that will cost them extra.
I wish I had your support in the anti-Microsoft thread over in Software Development. I gave up after a couple of hours.
Aug 6 '08 #11
pbmods
5,821 Expert 4TB
At least we fixed the OP's problem before hijacking his thread O:)
Aug 6 '08 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dean J. Garrett | last post by:
Hi, I need to create HTML e-mail from an ASP program that includes embedded images that go along with the e-mail, e.g. logos, product image, etc. Is there a technique in HTML that people use to...
1
by: Chris Nafziger | last post by:
In my code to send email from VBScript, I use standard CDOSYS code similar to the following: With oMsg Set .Configuration = oCon .To = """Admin"" <admin@mycompany.com>" .From =...
2
by: dr_tyson | last post by:
I am trying to embed images into a wxPython app (created using Boa Constructor), but have not been able to do so. I know how to embed plots, but images seem to be a problem. I've tried using code...
3
by: Tim T | last post by:
Hi, I hope there is someone reading this that has the answer, Please Help! I have the need to send a html email via asp.net. its easy enough to send an html email and add attachments. My...
2
by: Ersin Gençtürk | last post by:
is it possible to embedd images as inline images into e-mail in pure asp.net ? I don't want my pictures sent like attachment , but I want to send them as inline pictures.Is there any way to do...
7
by: David Thielen | last post by:
Hi; Is there a way to embed images in the response rather than writing them to disk and having an <img ...> tag? And if so, how is it done and what browsers support it? -- thanks - dave
6
by: Edward | last post by:
I have been doing some research about embedding images in HTML using the data URL src method of the format: <img src="/-/data:image/gif;base64,<DATA>"> My question is, how does one generate...
1
by: MissMarie | last post by:
I've been playing around with DIV tables in myspace to better learn how to rewrite my own code for my business site without having to pay someone to design it. I've tried embedding a slideshow into...
0
by: macap.usenet | last post by:
Hello, i am embedding System.Web.UI.WebResources in my C# Class via: I use this resource with: Page.Header.Controls.Add(new LiteralControl("<link href='"ExtJS.yui- ext.css"'...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.