Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pcproff

macrumors member
Original poster
Jul 14, 2004
59
0
Ft. Lauderdale,FL.
Guys,
I am designing an invitation for a client that will go out to the readers of his book for a signing. How do I embedd an image into an email? I dont want to just attach an image into the body of the email. I know there is a way to do it via HTML (if the viewer has HTML read options on the email) Can anyone help?
 

angelneo

macrumors 68000
Jun 13, 2004
1,541
0
afk
I'm not sure how to do it in Mac (I just switched not too long ago). You can actually do it in outlook express. Click on edit source, paste in your html codes with the image linking back to your local drive image location, and when you send outlook express will automatically attach and embedded the image inline for you. I'm not on my mac now, so I can only find it out if it works in Apple Mail when I get home.
 

pcproff

macrumors member
Original poster
Jul 14, 2004
59
0
Ft. Lauderdale,FL.
Hey Neo thanks for the help I am sure I can do it in Outlook but it would be nice to find out how to do it in Mail. Thanks for all your help.
 

ahunter3

macrumors 6502
Oct 15, 2003
377
5
pcproff said:
Guys,
I am designing an invitation for a client that will go out to the readers of his book for a signing. How do I embedd an image into an email? I dont want to just attach an image into the body of the email. I know there is a way to do it via HTML (if the viewer has HTML read options on the email) Can anyone help?

Unless the readers of his book are an unusual lot and/or are actively expecting such an email, putting a $##@$% image and HTML formatting into the email for your client is going to dramatically reduce the number of people who will ever see it.

Lots of folks set their spam filters to toss anything with HTML formatting straight into the trash.

Many others who don't do that do nevertheless have their email client set to NOT render HTML (because it is used by spammers to verify valid email addresses) and so they may see the email despite the HTML and the embedded image but what they will actually be seeing is your raw ugly bracket-laden code.

Email is a text-only medium and should stay that way.

:mad:

[/geezer mode]
 

jsw

Moderator emeritus
Mar 16, 2004
22,910
44
Andover, MA
ahunter3 said:
Unless the readers of his book are an unusual lot and/or are actively expecting such an email, putting a $##@$% image and HTML formatting into the email for your client is going to dramatically reduce the number of people who will ever see it.
Actually, the vast majority of email users simply use their email programs with their default setups - which, with Mail and most apps, means they'll display images that are linked in via HTML.
ahunter3 said:
Lots of folks set their spam filters to toss anything with HTML formatting straight into the trash.
Lots? Yes, agreed. Most? No.
ahunter3 said:
Many others who don't do that do nevertheless have their email client set to NOT render HTML (because it is used by spammers to verify valid email addresses) and so they may see the email despite the HTML and the embedded image but what they will actually be seeing is your raw ugly bracket-laden code.
Again, most users don't go to the effort to do this, although they should. However, the lack of a bounced email often serves to indicate the validity of an email address, so the image loading is usually a secondary, although more reliable, way of verifying an address.
ahunter3 said:
Email is a text-only medium and should stay that way.
[/geezer mode]
I only partially agree - email, like postal mail, is at its ugliest when it's text-only, and the only valid reason I see for keeping it that way is to make it harder for spammers to verify an email address, which seems a bit ridiculous.

pcproff said:
umm.. ok lol. So if your so against that, what would you do to contact 485 people via email?? Explain that one.
You could always provide a URL in the email which users could click on to go to a site which contained the content you would have emailed to them otherwise.
 

decksnap

macrumors 68040
Apr 11, 2003
3,075
84
Typically when you send out HTML emails, you are supposed to provide a plain text version also. So whatever the end user has their prefs set to, they get a legitimate looking email either way. I would do some more research on the subject. I'm not an expert, but I've learned a bit about it along the way. Another thing is typically all the images are served from a site somewhere, so you would use all absolute links in your email HTML and point them to the server where the images are stored.

Try looking at the source code for a few emails in Mail. That might help get you started. (View > Message > Raw Source)

You can also employ a service for this sort of thing if you are going to be doing it on a repetitive basis. Something like:

http://www.constantcontact.com

You can upload and manage your databases, use templates, or make your own.
 

pcproff

macrumors member
Original poster
Jul 14, 2004
59
0
Ft. Lauderdale,FL.
Why do you need to have a html mail just because you want to mail 485 people...???

Just make a group in Address Book, compose a nice plain text message and BCC the group...

My boss had me design an invitation promoting the book and he wants me to email this to people on the waiting list for the book. Well I know that HTML email is not the way to go and I never have my mail client with HTML view enabled. I will include text obviously when sending this to his clients in case they have the HTML disabled. I mean its not like we are spamming people these are clients of his that want to be emailed. I am thinking doing something like <img="http://www.url.com/pic.jpg> Is this right? If so where do I insert it?
 

cahill

macrumors newbie
Dec 3, 2008
1
0
Bournemouth, England
no attachments?

I have designed my email in html and embedded my images within it like this:
<img src="http://domain/image.jpg" />. although my images are stored on my server, every time I send the email to test it, it attaches all the images. I would prefer this not happen and haven't found any solution.

anybody able to shed some light on this?

thanks in advance.
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
I have designed my email in html and embedded my images within it like this:
<img src="http://domain/image.jpg" />. although my images are stored on my server, every time I send the email to test it, it attaches all the images. I would prefer this not happen and haven't found any solution.

anybody able to shed some light on this?

thanks in advance.

What software are you using to create the HTML and also send the email?
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,871
3
Alexandria, VA, USA
Typically when you send out HTML emails, you are supposed to provide a plain text version also. So whatever the end user has their prefs set to, they get a legitimate looking email either way. I would do some more research on the subject. I'm not an expert...

That was sound, expert advice, actually. That is the proper way to handle the situation as developers. In a single E-Mail both HTML and text versions may be specified using special headers and a boundary command for each. Then upon delivery the client mail reader will present whichever format the user has selected as their default view. This is the process. Below I've included an example of how it's done in actual code.

Developers first need to learn the various mail headers/boundary commands, then simply write a script that generates e-mail combining both formats, like this:

Code:
Date: Mon, 11 Feb 2002 16:08:19 -0500 
To: The Receiver <recipient@some.net> 
From: The Sender <sender@some.net> 
Subject: A simple mixed message 
MIME-Version: 1.0 
Content-Type: multipart/alternative; 
              boundary="==Multipart_Boundary_xc75j85x" 
 
This is a multi-part message in MIME format. 
 
--==Multipart_Boundary_xc75j85x 
Content-Type: text/plain; charset="iso-8859-1" 
Content-Transfer-Encoding: 7bit 
 
This is the text portion of the mixed message. 
 
--==Multipart_Boundary_xc75j85x 
Content-Type: text/html; charset="iso-8859-1" 
Content-Transfer-Encoding: 7bit 
 
<html> 
<body> 
<p>This is the <b>HTML portion</b> of the mixed message.</p> 
</body> 
</html> 

--==Multipart_Boundary_xc75j85x--

See the differences in the Content-Type header, text/plain vs. text/html? And the mulitpart boundry used to separate the two formats? That's what it takes "under the hood" for all software to make the magic happen. As you can see some of the headers seem to be software generated with random data (re: boundary) plus the double equal signs and double dashes that have to be perfectly setup. This is intended to comply with strict email RFC standards.

There are many PHP classes out there that simplify the mail sending process so you can do things like this concentrating on the email content and not the RFC's. Here is one called PHPMAILER, for example, use the one at the top. On that page are also other versions that not only send both formats, but allow powerful list serve functions for e-mail subscriptions and database recipient lists as well. It's an amazing set of classes. 5 out of 5 stars.

-jim
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
By the by, does anyone know if Mail uses webkit to render email?
According to Wikipedia, yes.
WebKit is used as the rendering engine within Safari on Mac OS X, Windows and the iPhone. Other applications on Mac OS X can make use of WebKit, for example Apple's email client Mail and the 2008 version of Microsoft's Entourage personal information manager both make use of WebKit to render e-mail messages with HTML content.

Just and FYI for folks popping in, this thread was originally started in 2006 and was awoken once more at post 11, so you may want to aim responses to that individual's question. Not that the other other info provided since isn't valuable.
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,871
3
Alexandria, VA, USA
What software are you using to create the HTML and also send the email?

I also would like to see the OUTBOUND email with full headers intact prior to being relayed. Meaning, redirect the output to a file or screen. Not the inbound one with all the images you get upon delivery (since it is processed by your mail server). If possible, please.

-jim
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.