Go Back   Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum > Support > php issues.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-09-2007, 12:34 PM
Member
 
Join Date: May 2007
Posts: 37
Default Sending HTML mail using PHP

Is it possible to send HTML formatted email using php? I am able to send text mail using php but when I use html tags they are displayed as plain text.
Reply With Quote
  #2 (permalink)  
Old 05-09-2007, 01:22 PM
kev woodman's Avatar
Premium Member
 
Join Date: Jul 2006
Location: Newport, Wales, UK.
Posts: 1,494
Default

Are you setting the content type e.g. Content-Type: text/html; in the header?
__________________
homo sum: humani nil a me alienum puto ... ( just Google it )
Reply With Quote
  #3 (permalink)  
Old 05-09-2007, 02:45 PM
Member
 
Join Date: May 2007
Posts: 37
Default

No, can you show me sample of code, so that I know how to use it. I have read somewhere and trying to read striptags right now. Will it work with it?
Reply With Quote
  #4 (permalink)  
Old 05-10-2007, 07:15 AM
kev woodman's Avatar
Premium Member
 
Join Date: Jul 2006
Location: Newport, Wales, UK.
Posts: 1,494
Default

Not sure what you mean about striptags but there's a good tutorial here on HTML email with PHP.. Alternatively you could use a pre-built component like PHPMailer.
__________________
homo sum: humani nil a me alienum puto ... ( just Google it )
Reply With Quote
  #5 (permalink)  
Old 05-10-2007, 11:35 AM
Member
 
Join Date: May 2007
Posts: 37
Default

Ok thank you everyone for their support. I have used phpmailer and its working great now. Is there anyone who is having newsletter script now. SO I can use it with my email class and send html news letters?
Reply With Quote
  #6 (permalink)  
Old 05-10-2007, 02:25 PM
Senior Member
 
Join Date: Jan 2007
Posts: 939
Default

Quote:
Is there anyone who is having newsletter script now
If you mean are there any newsletter scripts available, then yes, there are loads! But why would you want to use one? I mean, you seem to be familiar with php and mysql, and now phpmailer also, so all you need is a form. And if you want to use plenty of html in your newsletter then install a wysiwyg editor in your form like the one I use, which is fantastic FckEditor.
Reply With Quote
  #7 (permalink)  
Old 05-10-2007, 02:54 PM
kev woodman's Avatar
Premium Member
 
Join Date: Jul 2006
Location: Newport, Wales, UK.
Posts: 1,494
Default

Apropos of nothing I like the tinymce editor which is similar to fckeditor, although it's worth cutting all the language files out of it before you install it.
__________________
homo sum: humani nil a me alienum puto ... ( just Google it )
Reply With Quote
  #8 (permalink)  
Old 05-10-2007, 05:35 PM
Senior Member
 
Join Date: Jan 2007
Posts: 939
Default

Quote:
Originally Posted by kev woodman View Post
Apropos of nothing I like the tinymce editor which is similar to fckeditor, although it's worth cutting all the language files out of it before you install it.
I could never get tinymce to load quickly enough, even following the condencing instructions. Also fck gave me the option to upload images into different directories on the fly using a bit of php and cookies.

For a much simpler editor I also use openwysiwyg, have you tried it?
Reply With Quote
  #9 (permalink)  
Old 05-11-2007, 06:59 AM
kev woodman's Avatar
Premium Member
 
Join Date: Jul 2006
Location: Newport, Wales, UK.
Posts: 1,494
Default

I've not tried openwysiwyg but fckeditor sounds interesting. Perhaps I'll give that a go next time I need one.
__________________
homo sum: humani nil a me alienum puto ... ( just Google it )
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:33 AM.
Copyright 2002-2007 WebHosting.uk.com. All rights reserved.
Web Hosting UK Forum