La function tep_mailto assure le liens pour envoyer un mail vers un clients.
librairie html_ouptut.php
Elle renvoi donc vers la page mail.php, et fournis l’adresse email du client, et les éléments nécessaire au bouton retour à la page précédente.
Apercu
/**
@author oscim <mail oscim@oscss.org> <www http://www.oscim.fr>
@note idem tep_href_link, mais pour le mailto
@param string customer_email mail du client
@param string origin page appelante
*/
function tep_mailto($customer_email,$origin='') {
if(!empty($origin))return tep_href_link(FILENAME_MAIL, 'customer=' . $customer_email.'&origin='.urlencode($origin), 'NONSSL');
else return tep_href_link(FILENAME_MAIL, 'customer=' . $customer_email, 'NONSSL');
}
@author oscim <mail oscim@oscss.org> <www http://www.oscim.fr>
@note idem tep_href_link, mais pour le mailto
@param string customer_email mail du client
@param string origin page appelante
*/
function tep_mailto($customer_email,$origin='') {
if(!empty($origin))return tep_href_link(FILENAME_MAIL, 'customer=' . $customer_email.'&origin='.urlencode($origin), 'NONSSL');
else return tep_href_link(FILENAME_MAIL, 'customer=' . $customer_email, 'NONSSL');
}
La fonction produit un retour, contenant le liens complet, donc à placer dans le href d’un liens.
<a href="<?php echo tep_mailto($customer_email,$origin) ?>">mail vers client</a>