Autor Zpráva
PHPMAIL
Profil *
Čaute, dělal jsem si script pro odeslání emailu se souborem, na google mail(gmail) vše funguje - HTML + soubor příjde v pořádku, ale na Seznamu nefunguje HTML ani ten soubor.

Email vypadá takhle :

Content-Type: text/html

Content-Transer-Encoding: 7bit

<b>Varianta rozesílky : </b>100.000 email - 9.500 Kč<br /><b>Kontaktní os

oba : </b>sdfsd<br /><b>Email/telefon : </b>tadeas.jilek@email.cz<br /><b>Da

tum rozesílky : </b>sdf<br /><b>Vlastní newsletter : </b>ano



<b>Varianta rozesílky : </b>100.000 email - 9.500 Kč<br />

<b>Kontaktní osoba : </b>sdfsd<br />

<b>Email/telefon : </b>tadeas.jilek@email.cz<br />

<b>Datum rozesílky : </b>sdf<br />

<b>Vlastní newsletter : </b>ano

Soubor vypadá podobně a můj script je zde :
$email_from = $email; // Who the email is from  
$email_subject = "Zpráva z webu"; // The Subject of the email  
$message2 = "<b>Varianta rozesílky : </b>$varianta<br />";
$message2 .= "<b>Kontaktní osoba : </b>$kontakt<br />";
$message2 .= "<b>Email/telefon : </b>$email<br />";
$message2 .= "<b>Datum rozesílky : </b>$datum<br />";
$message2 .= "<b>Vlastní newsletter : </b>$newsletter"; 
$email_to = "tadeas.jilek@email.cz"; // Who the email is to  
$boundary = md5(rand());
$headers = array(
"MIME-Version: 1.0",
"Content-Type: multipart/mixed; boundary=\"{$boundary}\"",
"From: {$email_from}",
);
$message = array(
"--{$boundary}",
"Content-Type: text/html",
"Content-Transer-Encoding: 7bit",
chunk_split($message2),
"<b>Varianta rozesílky : </b>$varianta<br />",
"<b>Kontaktní osoba : </b>$kontakt<br />",
"<b>Email/telefon : </b>$email<br />",
"<b>Datum rozesílky : </b>$datum<br />",
"<b>Vlastní newsletter : </b>$newsletter",
"--{$boundary}",
"Content-Type: {$_FILES['file']['type']}; name=\"{$_FILES['file']['name']}\"", 
"Content-Disposition: attachment; filename=\"{$_FILES['file']['name']}\"",
"Content-Transfer-Encoding: base64",
chunk_split(base64_encode(file_get_contents("docasnesoubory/" . $_FILES["file"]["name"]))),
"--{$boundary}--",
);

$ok = @mail($email_to, $email_subject, implode("\r\n", $message), implode("\r\n", $headers));  








if($ok){
echo "<script>alert('Email byl úspěšně odeslán.');</script>";
}else{
echo "<script>alert('Email nebyl odeslán.');</script>";
}
CZechBoY
Profil
čau, použij už hotovou třídu :D :D :D

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0