Ejemplo n.º 1
0
$converter = isset($converter) ? $converter : $got_converter;
$selected = $converter != '';
$show_coords_conv = isset($show_coords_conv) ? $show_coords_conv : false;
$got_geodesic = isset($_GET['g']) ? $_GET['g'] : '';
$geodesic = isset($geodesic) ? $geodesic : $got_geodesic;
$geodesic = urldecode(stripslashes($geodesic));
$readonly = isset($_GET['readonly']) ? $_GET['readonly'] == 'true' ? 'true' : 'false' : 'false';
$conv_iso = isset($_GET['i']) ? $_GET['i'] : '';
if (!$parted) {
    include "../conf/config.php";
    include "../func/function.php";
    include "declaration.php";
    echo getDoctype(false) . "\n";
    ?>
<html <?php 
    echo getHTMLTagContent();
    ?>
>
  <head>
    <script type="text/javascript" charset="UTF-8" src="<?php 
    echo getScriptJS(__FILE__);
    ?>
"></script>
<?php 
    include "application_" . $_SESSION['language'] . ".php";
    include "mailfunctions_" . $_SESSION['language'] . ".php";
    ?>
    <?php 
    echo getMetaTags();
    ?>
    <title><?php 
Ejemplo n.º 2
0
function sendMail2($mail_dest, $subject, $mail_body, $from_email = "", $add_cc_email = "", $send_a_copy = true)
{
    $mail_subject = "[" . $_SESSION['Application_name'] . "]" . " " . $subject;
    if ($from_email == "") {
        $from_email = $_SESSION['Application_mail'];
    }
    $reply_email = $from_email;
    $header_date = date("D, j M Y H:i:s");
    //-0600"); // avec offset horaire
    //HTML Content
    $css = 'body
          {
            font-family: arial, sans-serif;
            font-size: 9pt;
            background-color: white; 
            color: black;
          }
          
          a
          {
            text-decoration: none;
            color: #34558A;
            border-bottom: dotted 1px #458EFF;
          }
          
          a:hover
          {
            color: #FFA713;
            border-bottom: dotted 1px #FFA713;
          }';
    //$html_mail_body = '<html '.getHTMLTagContent().'><head><style type="text/css">'.$css.'</style><title>'.$subject.'</title></head><body>'.$mail_body.'</body></html>';
    $mail_body = "TEST";
    $html_mail_body = '<html ' . getHTMLTagContent() . '><head><title>' . $subject . '</title></head><body>' . $mail_body . '</body></html>';
    //TXT Content
    $txt_mail_body = HTML2TxtMail($html_mail_body);
    $pipe = '-----=' . md5(uniqid(mt_rand()));
    $mail_header = 'From: ' . $from_email . "\n";
    if ($add_cc_email != "") {
        $mail_header .= 'Cc: ' . $add_cc_email . "\n";
    }
    if ($send_a_copy) {
        $mail_header .= 'Bcc: ' . $_SESSION['Application_mail'] . "\n";
    }
    $mail_header .= 'Reply-To: ' . $reply_email . "\n";
    $mail_header .= 'Return-Path: ' . $reply_email . "\n";
    $mail_header .= 'MIME-Version: 1.0' . "\n";
    $mail_header .= 'Content-Type: multipart/alternative; boundary="' . $pipe . '"';
    $mail_header .= 'X-Mailer: PHP/' . phpversion() . "\n";
    $mail_header .= 'Date: ' . $header_date;
    //-----------------------------------------------
    // TXT
    //-----------------------------------------------
    $mail_body = 'This is a multi-part message in MIME format.' . "\n\n";
    $mail_body .= '--' . $pipe . '--' . "\n";
    $mail_body .= 'Content-Type: text/plain; charset="UTF-8"' . "\n";
    $mail_body .= 'Content-Transfer-Encoding: 8bit' . "\n\n";
    $mail_body .= $txt_mail_body . "\n\n";
    //-----------------------------------------------
    // HTML
    //-----------------------------------------------
    $mail_body .= '--' . $pipe . '--' . "\n";
    $mail_body .= 'Content-Type: text/html; charset="UTF-8"' . "\n";
    $mail_body .= 'Content-Transfer-Encoding: 8bit' . "\n\n";
    $mail_body .= $html_mail_body . "\n\n";
    $mail_body .= '--' . $pipe . '--' . "\n";
    return mail($mail_dest, $mail_subject, $mail_body, $mail_header);
}