[FX.php List] How to send HTML emails in PHP

Bob Patin bob at patin.com
Thu Jan 24 17:18:20 MST 2008


These are all emails that are sent from a site that they embed in  
their company sites, so they'll recognize them as not being spam.  
They're all sales leads.

Client wants it, I gotta supply it... :)

I just wish I knew how to keep that one line from showing...

Other than that, the emails look fine.

BP



> Well for many HTML is per definition spam.
>
> ggt
>
> 2008/1/24, VanBuskirk, Patricia <pvanbuskirk at otc.fsu.edu>:
>>
>>
>>
>>
>> I recently went through a nightmare with this same situation … as  
>> some email
>> clients are not as forgiving with the code as others!  phpMailer is  
>> what I
>> used that ended up working.  I'll try to attach it, but not sure if  
>> the list
>> accepts attachments.  Also, read some rules at
>> http://kickasswebdesign.com/wordpress/2007/02/the-new-rules-for-html-email/
>> and http://www.anandgraves.com/html-email-guide .. there
>> are many if you do a Google search for "html email".
>>
>>
>>
>>
>>
>>
>>
>> From: fx.php_list-bounces at mail.iviking.org
>> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of
>> Leo R. Lundgren
>> Sent: Thursday, January 24, 2008 3:07 PM
>> To: FX.php Discussion List
>> Subject: Re: [FX.php List] How to send HTML emails in PHP
>>
>>
>>
>>
>> Haven't actually done html mails myself yet, but check out  
>> SwiftMailer.org.
>>
>>
>>
>>
>>
>> -|
>>
>>
>>
>>
>>
>>
>> 24 jan 2008 kl. 21.03 skrev Bob Patin:
>>
>>
>>
>>
>>
>> I've got a client for whom I send automated emails from their  
>> website;
>> they're asking if I can add their logo to the email. I use  
>> something called
>> "sock_mail" which was given to me by a consultant, and it's plain- 
>> text.
>>
>>
>>
>>
>>
>> Is there an easy way to send an HTML email from PHP? I tried taking  
>> some
>> HTML and putting it into an email body, but the message comes back  
>> as HTML
>> code rather than what it's supposed to look like when displayed in  
>> an HTML
>> email message.
>>
>>
>>
>>
>>
>> Instead of pretty HTML, I received this:
>>
>>
>>
>>
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta
>> http-equiv="Content-Type" content="text/html; charset=UTF-8"
>> /><title>Untitled Document</title></head><body><img
>> src="http://www.client.com/images/logo.jpg" width="376"
>> height="55" /></body></html>
>>
>>
>>
>>
>>
>> Any help would be mucho appreciated.
>>
>>
>>
>>
>>
>>
>> Bob Patin
>>
>>
>> Longterm Solutions
>>
>>
>> bob at longtermsolutions.com
>>
>>
>> 615-333-6858
>>
>>
>> http://www.longtermsolutions.com
>>
>>
>> Member of FileMaker Business Alliance and FileMaker TechNet
>>
>>
>>
>>
>>
>>  CONTACT US VIA INSTANT MESSAGING:
>>
>>
>>     AIM or iChat: longterm1954
>>
>>
>>     Yahoo: longterm_solutions
>>
>>
>>     MSN: tech at longtermsolutions.com
>>
>>
>>     ICQ: 159333060
>>
>>
>>
>>
>>
>> --------------------------
>>
>>
>> Contact us for FileMaker hosting and programming for all versions of
>> FileMaker
>>
>>
>> PHP • CDML • Full email services • Free DNS hosting • Colocation •
>> Consulting
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>>
>>
>> FX.php_List mailing list
>>
>>
>> FX.php_List at mail.iviking.org
>>
>>
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>>
>>
>>
>>
>>
>> -|
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>>
>>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list