[Techtalk] PHP mail, images and user's clients.

April april at farstrider.org
Sat Feb 19 03:48:05 EST 2005

I understand generally what you're talking about, but haven't physically 
sent HTML email myself (so bits of this are vague).

1)  To display an image in the body of the email, it needs to be an HTML 
email.  You need to set the "type" of the email to HTML (which the 
PHPMailer class can do), then the email itself needs to be in HTML.   If 
you want a "Display Images" button, you might be able to cobble it 
together with Javascript, but it would be cumbersome and would probably 
just work on Windows machines using Outlook or Outlook Express.   It's 
possible to send an email of type HTML and an email of type text 
together in one email, so people see the HTML email if they can, but 
people with it turned off just see text (I'm not sure exactly how to do 
this).  Most mailing list keepers give people an option to choose HTML 
email or text email when they sign up, since it's so hard to let them 
choose later between an email with images and one without.

2)  Example:

<a href="mailto:someone at yoursite.com?subject=Request for assistence
&body=Enter the description of the problem here
&cc=helpdesk at yoursite.com&bcc=theboss at yoursite.com">
Click here to ask for tech support</a>

Just a warning... a significant number of web users would have problems 
with this setup.  They're people who only use Hotmail, so don't have an 
ISP pop account set up, or people who have their mail configured in one 
email client but another email client is set as their default.  I 
wouldn't know the exact numbers, but I'd guess maybe 20 to 40% of random 
users wouldn't be able to send you an email seamlessly from a link on a 
website.  You might want to look into a PHP form mail script instead.

Sue Stones wrote:

> G'day
> I have been trying to sort out how to do a couple of things with 
> emails sent from a webpage written in PHP.  I have been unable to find 
> this info in books or by searching on Goggle.  I guess I don't have 
> the right search terms.  I will keep searching but no doubt someone 
> here knows the answer.
> 1) How do I include images that display in the body of the mail where 
> the user has the ability to not download the images if they don't want 
> to.
> 2) How do I get open an email in the user's client (ie like an HTML 
> mailto link) but with the content of the email coded by the webpage?
> sue
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://linuxchix.org/cgi-bin/mailman/listinfo/techtalk

More information about the Techtalk mailing list