--- parser3/src/classes/mail.C 2001/05/08 10:23:49 1.28 +++ parser3/src/classes/mail.C 2001/08/06 16:18:26 1.34 @@ -5,8 +5,9 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: mail.C,v 1.28 2001/05/08 10:23:49 paf Exp $ + $Id: mail.C,v 1.34 2001/08/06 16:18:26 parser Exp $ */ +static const char *RCSId="$Id: mail.C,v 1.34 2001/08/06 16:18:26 parser Exp $"; #include "pa_config_includes.h" @@ -119,7 +120,9 @@ static void uuencode(String& result, con "end\n"; } -/// ^mail:send[$attach[$type[uue|mime64] $value[DATA]]] +/** ^mail:send[$attach[$type[uue|mime64] $value[DATA]]] + @todo solve - bad with html attaches +*/ static const String& attach_hash_to_string(Request& r, const String& origin_string, Hash& attach_hash) { Pool& pool=r.pool(); @@ -165,13 +168,13 @@ static const String& attach_hash_to_stri } -static bool find_content_type(const Hash::Key& aattribute, Hash::Val *ameaning, +static void *find_content_type(const Hash::Key& aattribute, Hash::Val *ameaning, void *) { - return StrEqNc(aattribute.cstr(), CONTENT_TYPE_NAME); + return StrEqNc(aattribute.cstr(), CONTENT_TYPE_NAME)?ameaning:0; } -static bool find_content_type_charset(const Hash::Key& aattribute, Hash::Val *ameaning, +static void *find_content_type_charset(const Hash::Key& aattribute, Hash::Val *ameaning, void *) { - return StrEqNc(aattribute.cstr(), "charset"); + return StrEqNc(aattribute.cstr(), "charset")?ameaning:0; } /// used by mail: _send / letter_hash_to_string / add_header_attribute @@ -332,7 +335,7 @@ static void sendmail(Request& r, const S SMTP& smtp=*new(pool) SMTP(pool, method_name); Value *server_port; - // $MAIN:MAIL.SMTP[mail.design.ru] + // $MAIN:MAIL.SMTP[mail.yourdomain.ru[:port]] if(mail_conf && (server_port=static_cast(mail_conf->get( *new(pool) String(pool, "SMTP"))))) { @@ -417,7 +420,7 @@ static void sendmail(Request& r, const S static void _send(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); - Value& vhash=params->get_no_junction(0, "message must not be code"); + Value& vhash=params->as_no_junction(0, "message must not be code"); Hash *hash=vhash.get_hash(); if(!hash) PTHROW(0, 0,