Autor | Zpráva | ||
---|---|---|---|
stradivarius Profil * |
#1 · Zasláno: 27. 11. 2006, 10:52:37
Ahoj,
sestavuju html mail. pomoci baliku Mail_mime. Mam tam logo obrazek, plain text a html text. Blby je to ze na webovejch mailech jako email.cz nebo horde to funguje. Na linuxu v thunderbirdu a evolution to funguje. Na win v Outluku E ani na poslednim Thunderbirdu ne-e. THB zobrazuje kod zpravy a OE pro jistotu vubec nic. WTF? Muj kod vypada takhle: $msg = '<div style="font-family: Arial, Verdana, sans-serif;">text</div>'; $html = "<html><body>$msg<br><br><img src='logo.gif'></body></html>"; $text = strip_tags(br2nl($msg)); $file = $_SERVER['DOCUMENT_ROOT'].'/images/logo.gif'; $crlf = "\r\n"; $hdrs = array( 'From'=> $from, 'Subject' => $subj ); $mime = new Mail_mime($crlf); $mime->setTXTBody($text); $mime->setHTMLBody($html); $mime->addHTMLImage($file); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $mail =& Mail::factory('mail'); $response = $mail->send($to, $hdrs, $body); Zdroj zpravy ma pak takovou strukturu (zkraceno:) Message-ID: <20061126181036.14181.qmail@vlc-141.dns-servicios.com> To: test@test.com Subject: =?iso-8859-1?Q?test?= MIME-Version: 1.0 From: portal@test.com Content-Type: multipart/alternative; boundary="=_3676aa5fc78e486c59ab5dacfabe2bcd" --=_3676aa5fc78e486c59ab5dacfabe2bcd Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit text --=_3676aa5fc78e486c59ab5dacfabe2bcd Content-Type: multipart/related; boundary="=_1b1552d74616e1c0dd7a2a11017495fa" --=_1b1552d74616e1c0dd7a2a11017495fa Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable <html><body> <div style="font-family: Arial, Verdana, sans-serif;">text</div> <br><br><img src=3D'cid:3422a692f5491881969e58daff25a99c'></body></html> --=_1b1552d74616e1c0dd7a2a11017495fa Content-Type: application/octet-stream Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="logo.gif" Content-ID: <3422a692f5491881969e58daff25a99c> Mozna Mail_mime neni nejlepsi balik... Diky za napady. |
||
stradivarius Profil * |
#2 · Zasláno: 28. 11. 2006, 20:39:50
vyreseno phpmailerem.
nevim cim to, ale zacatek mime definic je u phpmaileru jiny: Content-Type: multipart/related; type="text/html"; boundary="b1_70382471b97e56dd8297a742ab42cd55" -s |
||
Časová prodleva: 17 let
|
Toto téma je uzamčeno. Odpověď nelze zaslat.
0