Page 1 of 1

Email, html format ?

Posted: Sat Sep 02, 2006 3:12 pm
by m4d
Can we send an email in html format in php-residence, with the contract feature ?
If yes, can we employ the standard HTML ?
I have tried but it doesn't work ... :oops:
Do you have a example ?

Thanks

Posted: Wed Sep 13, 2006 8:15 am
by marco
For now you can send only plain text emails with attachments.

Marco

Re: Email, html format ?

Posted: Tue Jan 11, 2011 11:25 pm
by ojmalpeque
Hi Marco,

In 2011, I have the same question: Can we send an email in html format in php-residence, with the contract feature ?

Great Job,
Thanks

Olivier

Re: Email, html format ?

Posted: Tue Dec 11, 2012 5:29 pm
by marco
Hello Olivier,
it's now possible with new hoteldruid versions.

Regards,
Marco

Re: Email, html format ?

Posted: Fri Jan 04, 2013 12:29 pm
by Prokophs
There you go ;-)

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Voucher or Invoice</title>
</head>
<body style="background-color:#e5e5e5; padding:20px; font-family:Arial, Helvetica, sans-serif; font-size:12px;">
<div id="page" style="width:700px; margin:0 auto; background-color:#f9f9f9; padding:20px; box-shadow:0 0 0.7in -0.25in #888">
   
    <div id="header" style="width:100%; background-color:#aaa; text-align:center; border-radius:2px;">
        <h3 style="font-weight:normal; color:#fff; letter-spacing:2px; text-transform:uppercase; padding:5px 0; font-size:150%;">Voucher</h3>
    </div>
   
    <hr class="break" style="width:100%; height:1px; border:none; margin:20px 0; clear:both;" />
 
    <div id="structureData" style="width:100%; text-align:right">
        <h3 style="font-weight:normal; font-size:140%;">Hotel Name</h3>
        <p>
            address line 1<br />
            address line 2<br />
            Phone<br />
            <a href="website">www.website.com</a>
        </p>
    </div>
   
    <hr class="break" style="width:100%; height:1px; border:none; margin:30px 0; clear:both;" />
   
    <div id="content">
       
        <div id="guestDetails" style="float:left; width:50%; height:100px;">
            <table style="width:100%">
                <tr><td colspan="2" style="font-weight:normal; text-align:left; padding:5px 5px 5px 0px;">Guest</td></tr>
                <tr>
                    <td colspan="2" style="text-align:left; padding:5px 5px 5px 0px;">[name] [surname]</td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align:left; padding:5px 5px 5px 0px;">[email]</td>
                </tr>
            </table>
        </div>
       
        <div id="voucherDetails" style="float:right; width:50%; height:100px; text-align:right;">
            <table style="float:right;">
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px; width:126px;">Voucher #</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px; width:124px;">[reservation_number]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Date</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">[today]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Amount Due</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">€[rest_to_pay_p]</td>
                </tr>
            </table>
        </div>
       
        <hr class="break" style="width:100%; height:1px; border:none; margin:30px 0; clear:both;" />
       
        <div id="bookingDetails" style="width:100%; display:inline;">
           
            <div id="bookingDescription" style="float:left; width:280px;">
                <table style="width:100%">
                    <tr><td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Description</td></tr>
                    <tr><td style="text-align:left;">[rate_name] ([starting_date] ~ [ending_date])</td></tr>
                    <tr><td style="text-align:left;">[sel_extra_cost_name]</td></tr>
                </table>
            </div>
           
            <div id="bookingNights" style="float:left; width:140px;">
                <table style="width:100%">
                    <tr><td style="text-align:center; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Nights</td></tr>
                    <tr><td style="text-align:center;">[periods_num]</td></tr>
                </table>
            </div>
           
            <div id="bookingPeople" style="float:left; width:140px;">
                <table style="width:100%">
                    <tr><td style="text-align:center; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">People</td></tr>
                    <tr><td style="text-align:center;">[people_num]</td></tr>
                </table>
            </div>
           
            <div id="bookingAmount" style="float:left; width:140px;">
                <table style="width:100%">
                    <tr><td style="text-align:right; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Amount</td></tr>
                    <tr><td style="text-align:right;">€[rate_price_p]</td></tr>
                    <tr><td style="text-align:right;">€[sel_extra_cost_value_p]</td></tr>
                    <tr><td style="text-align:right;">-€[discount_p]</td></tr>
                </table>
            </div>
           
        </div>
       
        <hr class="break" style="width:100%; height:1px; border:none; margin:30px 0; clear:both;" />
       
        <div id="bookingAmount" style="width:100%;">
            <table style="float:right">
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px; width:124px;">Total</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px; width:126px;">€[price_tot_p]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Amount Paid</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">€[paid_p]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Balance Due</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">€[rest_to_pay_p]</td>
                </tr>
                <tr><td>&nbsp;</td></tr>
                <tr><td>&nbsp;</td></tr>
            </table>
        </div>
       
        <hr class="break" style="width:100%; height:1px; color:#bbb; background-color:#bbb; border:none; margin:30px 0; clear:both;" />
       
    <p>
      Thank you for your booking.<br />
      If you have any questions, please feel free to contact us at <a href="mailto:youremail">youremail</a>.
    </p>

    <hr class="break" style="width:100%; height:1px; color:#bbb; background-color:#bbb; border:none; margin:30px 0; clear:both;" />
    <p>
      <center><small>This communication is for the exclusive use of the addressee and may contain proprietary, confidential or privileged information. If you are not the intended recipient any use, copying, disclosure, dissemination or distribution is strictly prohibited.
      </small></center>
    </p>
  </div><!--end content-->
</div><!--end page-->
</body>

</html>

Re: Email, html format ?

Posted: Sun Mar 30, 2014 3:56 am
by AJMegaughin
It's quite a while since this template was posted but I've just stumbled upon it so thought I'd better say "That's really nice." and "Thanks."

The only suggestion I would have, and this may not have been possible when the html was originally written, would be to make the following substitutions in the html to auto-populate certain fields (assuming the values have already been entered under Menu -> Configure and Customise -> Property Data)

This would mean that any changes, for example our telephone number changed recently (!) , would only need to be altered once rather than in all your document templates...

Change "Hotel Name" to [structure_name]
change "address line 1" [structure_address]
Change "address line 2" to [structure_city]
Change "Phone" to [structure_telephone]
Change "www.website.com" to [structure_website]
Change "youremail" , twice, to [structure_address]

Maybe change "€" to [currency_name]

Other fields I found to be of use were :
[structure_nation] / [structure_postal_code] / [structure_fax] / [structure_fiscal_code] / [structure_vat_number]
and [structure_logo] , which contains a URL to your logo image file

I also added "This document was created on [today] by [current_user]"


Once again, thanks for the template.
It's lovely.

Re: Email, html format ?

Posted: Tue Jun 10, 2014 2:36 pm
by Prokophs
Dear Megaughin,

I'm really glad you liked the template but mostly that you have found it useful.
And for this i have made a new version of documents for you to use at this link.

http://www.hoteldruid.com/forum/viewtop ... 79d9b3da2a

You are absolutely right about the fields.
I left them on purpose so can everyone understands what are they meant for and consequently use the appropriate automatic field.

Happy coding ;-)