kodovani subjectu mailu



Pomoci quoted printable (zdroj citelnejsi) nebo base64 (zdroj necitelny)

napr. quoted printable:
(v debianu je treba mit nainstalovane php5-imap)
  function encode_subject($subj) {
      $in = array("\r\n", "\r", "\n", " ");
      $out = array("", "", "", "_");
      $subj = str_replace($in, $out, $subj);

      return "=?UTF-8?Q?" . imap_8bit($subj) . "?=";
  }

base64:
      return "=?UTF-8?B?" . base64_encode($subj) . "?=";
Last update:
2008-02-07 11:31
Author:
Daniel
Revision:
1.0
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.