RE: [PHP] Want to send email in html format
have something like mail($address, $subject, $body, $headers \nContent-Type: text/HTML; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit )in your mail mail( -Original Message- From: George Alexander [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 24, 2001 4:37 PM To: [EMAIL PROTECTED] Subject: [PHP] Want to send email in html format Hi, I am working on a newsletter module. What I want to know is that how can we send a newsletter via email to all the subscribers in html format with images in the htm too??? Well I am able to send an html file as attachment using the php mail() function. But I still can't see the images in the htm file. What I think is the mail function just sends the file as text only and it will not pick up the images in the html file. So is there a way that I can send the html format with images via email. Please reply asap. regards George _ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Want to send email in html format
One fairly easy way is to use Richard Heyes html mail class available at phpclasses.upperdesign.com I am working on a newsletter module. What I want to know is that how can we send a newsletter via email to all the subscribers in html format with images in the htm too??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Want to send email in html format
Hi Geroge, you can do this: Fist: make an php document with all the content of the letter at html ex: $body .= htmlheadtitleany title/title/head \n; $body .= body bgcolor=\#FF\ text=\#00\ \n; $body .= img src=\http://your.domain.com/image/image.gif\; width=\330\ height=\38\ \n; $body .= This is a mail at html \n; $body .= /body $body .= /html note that the image will to be taken from your site... Second: make the php script that will send the mail: require($body.php); //the document that has all the html tags $email =[EMAIL PROTECTED] //the mail of the person that you want to contact $topic = any subject; $from = [EMAIL PROTECTED]; $headers .= From: $from \n; $headers .= reply-To:$from\nX-Mailer: PHP/ .phpversion(). \n; $headers .= Content-Type: text/html; charset=iso-8859-1\n; $headers .= X-Priority: 1; @mail($email, $topic, $body, $headers); don't forget to put code next the mail() fuction or it will send you a message telling that it has no content... try it, if you have any problem, you can contact me... George Alexander wrote: Hi, I am working on a newsletter module. What I want to know is that how can we send a newsletter via email to all the subscribers in html format with images in the htm too??? Well I am able to send an html file as attachment using the php mail() function. But I still can't see the images in the htm file. What I think is the mail function just sends the file as text only and it will not pick up the images in the html file. So is there a way that I can send the html format with images via email. Please reply asap. regards George _ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- -- Romeo Manzur Web Application Developer iSilicom Av. 27 de Febrero 904-A Desp 1, Centro C.P.:86000 Villahermosa, Tabasco, Mexico Tel.:(52)(9)3-12-4790 -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Want to send email in html format
George Alexander [EMAIL PROTECTED] wrote: Hi, I am working on a newsletter module. What I want to know is that how can we send a newsletter via email to all the subscribers in html format with images in the htm too??? read http://www.php.net/mail -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]