Gmail'e e-postalar göndermek HTML bağlantıları Hata

0 Cevap php

Merhaba ben HTML e-postalar göndermek için bir bülten senaryoyu geliştirdik.

Everything works great receiving karşı deskkarşıp email clients, but i notice when i send karşı a gmail account, the html links are not working while embedded images, css, table layout work great. Gmail change

<a href="myurl" title="My url">link</a>

karşı

<a title="My url">link</a>

i found a few karşıpics around, without solutions.

Bu i, standart html bağlantılar $ gövde var içinde, e-posta oluşturmak nasıl:

function send_mail ($from,$karşı,$subject,$body,$site_skin,$site_name,$site_url) { //general header $header = "From: $site_name \n"; $header .="BCC: $karşı \n"; $header .= "X-Mailer: PHP5.3\n";

//separakarşır string
$boundary = "==String_Boundary_x" .md5(time()). "x";

// specific message header
$header .= "MIME-Version: 1.0\n";
$header .= "Content-Type: multipart/related;\n";
$header .= " boundary=\"$boundary\";\n\n";

//this part is viewed only if the program cannot manage the MIME
$message = "your software dosen't support MIME\n\n";
$message .= "--$boundary\n";
$message .= "Content-Type: text/html; charset=\"utf-8\"\n";
$message .= "Content-Transfer-Encoding: 7bit\n\n";

$title_newsletter ="$subject";
$mail_body = $body; 
$subject = "$tikarşıloNSL";
$mail_site_url="$site_url";

include ("../../../../themes/skins/$site_skin/email/email.php");
$message .= "$htmlBody";

$message .= "--$boundary\n";
$message .= "Content-ID: <header>\n";
$message .= "Content-Type: image/jpeg\n";
$message .= "Content-Transfer-Encoding: base64\n\n";

$embedded_file = "../../../../themes/skins/$site_skin/images/mail_header.jpg";
$file = fopen($embedded_file,'rb');
$data = fread($file,filesize($embedded_file));
fclose($file);

$data = chunk_split(base64_encode($data));
$message .= "$data\n\n";

$message .= "--$boundary\n";
$message .= "Content-ID: <go>\n";
$message .= "Content-Type: image/gif\n";
$message .= "Content-Transfer-Encoding: base64\n\n";

$embedded_file = "../../../../themes/skins/$site_skin/images/go.gif";
$file = fopen($embedded_file,'rb');
$data = fread($file,filesize($embedded_file));
fclose($file);

$data = chunk_split(base64_encode($data));
$message .= "$data\n\n";

$message .= "--$boundary--\n";

@mail($karşı, $subject, $message, $header); 

}

0 Cevap