Viewing file: mime.inc.php (1.5 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
############################################################################
# DWmail
# - version 4.0
# - Copyright (c) 2003-2006 Dominion Web Design
# - http://www.dominion-web.com/products/dwmail/
############################################################################
#
# The contents of this file are subject to the DWmail License version
# 2.2 ('License'). You may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.dominion-web.com/products/dwmail/license.php
# Software distributed under the License is distributed on an "AS IS" basis,
# without warranty of any kind, either express or implied.
#
# This code is Copyright (c) 2003-2006 Dominion Web Design.
# All rights reserved.
#
# This software may not be redistributed outside the terms of the
# license agreement.
#
############################################################################
*/
class MIME {
function MIME() {
}
function check8bit($message) {
// Check if a string contains 8bit characters or not
if (is_string($message)) {
for ($i=0; $i<strlen($message); $i++) {
if (ord($message[$i]) >> 7) {
return true;
}
}
return false;
}
return false;
}
function RFCEncode($message, $charset, $end = 1) {
// Encode non-ascii strings to RFC 2047
$message = "=?" . strtoupper($charset) . "?B?" . strtr(trim(base64_encode($message)), ' ', '_') . "?=";
return $message;
}
}
?>
|