70 |
return 1; |
return 1; |
71 |
} |
} |
72 |
|
|
73 |
|
/* don't add newlines to output stream */ |
74 |
|
function e_qp_nonl($foo) { |
75 |
|
|
76 |
|
$out=""; |
77 |
|
|
78 |
|
for($i=0; $i<strlen($foo); $i++) { |
79 |
|
$c=substr($foo,$i,1); |
80 |
|
$p=ord($c); |
81 |
|
if ($p == 10) { |
82 |
|
$out.="\n"; |
83 |
|
} else if (($p >= 33 && $p <= 60) || |
84 |
|
($p >= 62 && $p <= 126)) { |
85 |
|
$out.=$c; |
86 |
|
} else { |
87 |
|
$out.=sprintf("=%02X", $p); |
88 |
|
} |
89 |
|
|
90 |
|
} |
91 |
|
return $out; |
92 |
|
} |
93 |
|
|
94 |
|
/* like sendmail -t ... extract headers from message */ |
95 |
|
function iso_sendmail_t($msg) { |
96 |
|
$mail=popen("/usr/sbin/sendmail -t","w"); |
97 |
|
if (! $mail) { |
98 |
|
return 0; // error! |
99 |
|
} |
100 |
|
list($h,$b)=split("\n\n",$msg,2); |
101 |
|
fputs($mail, $h.' |
102 |
|
X-Mailer: php-quotedprintable-mailer |
103 |
|
Content-Type: text/plain; charset="iso-8859-2" |
104 |
|
Content-Transfer-Encoding: quoted-printable |
105 |
|
|
106 |
|
'.e_qp_nonl($b)); |
107 |
|
pclose($mail); |
108 |
|
return 1; |
109 |
|
} |
110 |
|
|
111 |
?> |
?> |