Loading ...
Sorry, an error occurred while loading the content.

Email html page templates

Expand Messages
  • pritesh loke
    Hello To All I create one one dynamic html template which i have to mail using php.Page conataints my website logo and some html designed but when i used mail
    Message 1 of 2 , Feb 10, 2007
    • 0 Attachment
      Hello To All
      I create one one dynamic html template which i have to mail using php.Page conataints my website logo and some html designed but when i used mail function they send only text so how can i send the complet html page which genrated using dynamic php ? I dont want to send page using attrchment files page can be see using on his email ID.


      Thank you.




      ---------------------------------
      Any questions? Get answers on any topic at Yahoo! Answers. Try it now.

      [Non-text portions of this message have been removed]
    • ansar ansar
      Hi, In php manual there is an example which explains how to send the html email. You need to set the header to html. I have pasted the function from manual
      Message 2 of 2 , Feb 14, 2007
      • 0 Attachment
        Hi,

        In php manual there is an example which explains how to send the html email. You need to set the header to html. I have pasted the function from manual just refer it.

        <?php
        // multiple recipients
        $to = 'aidan@...' . ', '; // note the comma
        $to .= 'wez@...';

        // subject
        $subject = 'Birthday Reminders for August';

        // message
        $message = '
        <html>
        <head>
        <title>Birthday Reminders for August</title>
        </head>
        <body>
        <p>Here are the birthdays upcoming in August!</p>
        <table>
        <tr>
        <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
        </tr>
        <tr>
        <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
        </tr>
        <tr>
        <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
        </tr>
        </table>
        </body>
        </html>
        ';

        // To send HTML mail, the Content-type header must be set
        $headers = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

        // Additional headers
        $headers .= 'To: Mary <mary@...>, Kelly <kelly@...>' . "\r\n";
        $headers .= 'From: Birthday Reminder <birthday@...>' . "\r\n";
        $headers .= 'Cc: birthdayarchive@...' . "\r\n";
        $headers .= 'Bcc: birthdaycheck@...' . "\r\n";

        // Mail it
        mail($to, $subject, $message, $headers);
        ?>


        Regards,
        Ansar Ahmed

        ----- Original Message ----
        From: pritesh loke <priteshloke@...>
        To: php_and_mysql@yahoogroups.com; php4india@yahoogroups.com; bang-phpug@yahoogroups.com
        Sent: Sunday, 11 February, 2007 10:28:03 AM
        Subject: [bang-phpug] Email html page templates













        Hello To All

        I create one one dynamic html template which i have to mail using php.Page conataints my website logo and some html designed but when i used mail function they send only text so how can i send the complet html page which genrated using dynamic php ? I dont want to send page using attrchment files page can be see using on his email ID.



        Thank you.



        ------------ --------- --------- ---

        Any questions? Get answers on any topic at Yahoo! Answers. Try it now.



        [Non-text portions of this message have been removed]














        <!--

        #ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;}
        #ygrp-mlmsg table {font-size:inherit;font:100%;}
        #ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}
        #ygrp-mlmsg pre, code {font:115% monospace;}
        #ygrp-mlmsg * {line-height:1.22em;}
        #ygrp-text{
        font-family:Georgia;
        }
        #ygrp-text p{
        margin:0 0 1em 0;
        }
        #ygrp-tpmsgs{
        font-family:Arial;
        clear:both;
        }
        #ygrp-vitnav{
        padding-top:10px;
        font-family:Verdana;
        font-size:77%;
        margin:0;
        }
        #ygrp-vitnav a{
        padding:0 1px;
        }
        #ygrp-actbar{
        clear:both;
        margin:25px 0;
        white-space:nowrap;
        color:#666;
        text-align:right;
        }
        #ygrp-actbar .left{
        float:left;
        white-space:nowrap;
        }
        .bld{font-weight:bold;}
        #ygrp-grft{
        font-family:Verdana;
        font-size:77%;
        padding:15px 0;
        }
        #ygrp-ft{
        font-family:verdana;
        font-size:77%;
        border-top:1px solid #666;
        padding:5px 0;
        }
        #ygrp-mlmsg #logo{
        padding-bottom:10px;
        }

        #ygrp-vital{
        background-color:#e0ecee;
        margin-bottom:20px;
        padding:2px 0 8px 8px;
        }
        #ygrp-vital #vithd{
        font-size:77%;
        font-family:Verdana;
        font-weight:bold;
        color:#333;
        text-transform:uppercase;
        }
        #ygrp-vital ul{
        padding:0;
        margin:2px 0;
        }
        #ygrp-vital ul li{
        list-style-type:none;
        clear:both;
        border:1px solid #e0ecee;
        }
        #ygrp-vital ul li .ct{
        font-weight:bold;
        color:#ff7900;
        float:right;
        width:2em;
        text-align:right;
        padding-right:.5em;
        }
        #ygrp-vital ul li .cat{
        font-weight:bold;
        }
        #ygrp-vital a {
        text-decoration:none;
        }

        #ygrp-vital a:hover{
        text-decoration:underline;
        }

        #ygrp-sponsor #hd{
        color:#999;
        font-size:77%;
        }
        #ygrp-sponsor #ov{
        padding:6px 13px;
        background-color:#e0ecee;
        margin-bottom:20px;
        }
        #ygrp-sponsor #ov ul{
        padding:0 0 0 8px;
        margin:0;
        }
        #ygrp-sponsor #ov li{
        list-style-type:square;
        padding:6px 0;
        font-size:77%;
        }
        #ygrp-sponsor #ov li a{
        text-decoration:none;
        font-size:130%;
        }
        #ygrp-sponsor #nc {
        background-color:#eee;
        margin-bottom:20px;
        padding:0 8px;
        }
        #ygrp-sponsor .ad{
        padding:8px 0;
        }
        #ygrp-sponsor .ad #hd1{
        font-family:Arial;
        font-weight:bold;
        color:#628c2a;
        font-size:100%;
        line-height:122%;
        }
        #ygrp-sponsor .ad a{
        text-decoration:none;
        }
        #ygrp-sponsor .ad a:hover{
        text-decoration:underline;
        }
        #ygrp-sponsor .ad p{
        margin:0;
        }
        o {font-size:0;}
        .MsoNormal {
        margin:0 0 0 0;
        }
        #ygrp-text tt{
        font-size:120%;
        }
        blockquote{margin:0 0 0 4px;}
        .replbq {margin:4;}
        -->









        __________________________________________________________
        Yahoo! India Answers: Share what you know. Learn something new
        http://in.answers.yahoo.com/

        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.