[geeklog-devel] Custom email localization

geeklog at mystral-kk.net geeklog at mystral-kk.net
Wed Jun 4 09:41:06 EDT 2008


Hi all, it might be too late for GL-1.5.0, but I'd like to point out a
possible problem in sending an email with GL.  This has exsited since
GL-1.4.1.

As of GL-1.5.0 in CVS, if you have defined CUSTOM_mail() function, it will
be used instead of COM_mail().  However, since neither
CUSTOM_formatEmailAddress() nor CUSTOM_emailEscape() is suppoted, you'll
immediately face a problem when the charset of your GL site is UTF-8 _AND_
you want to send an email in a charset OTHER THAN UTF-8.

So, how about supporting CUSTOM_formatEmailAddress() and
CUSTOM_emailEscape()?  I think this will need a minimum of code change in
lib-common.php as follows:

========== before ==========
function COM_emailEscape( $string )
{
    global $_CONF;

    $charset = COM_getCharset();
========== after ===========
function COM_emailEscape( $string )
{
    global $_CONF;

    if (function_exists('CUSTOM_emailEscape')) {
        return CUSTOM_emailEscape($string);
    }

    $charset = COM_getCharset();
============================

========== before ==========
function COM_formatEmailAddress( $name, $address )
{
    $formatted_name = COM_emailEscape( $name );
========== after ===========
function COM_formatEmailAddress( $name, $address )
{
    if (function_exists('CUSTOM_formatEmailAddress')) {
        return CUSTOM_formatEmailAddress($name, $address);
    }

    $formatted_name = COM_emailEscape( $name );
============================

-- 
  mystral-kk
  geeklog at mystral-kk.net
  http://mystral-kk.net





More information about the geeklog-devel mailing list