|
|
| version 1.19, 2001/04/17 19:00:27 | version 1.20, 2001/04/23 08:52:15 |
|---|---|
| Line 146 static const String& attach_hash_to_stri | Line 146 static const String& attach_hash_to_stri |
| } | } |
| static bool find_content_type(const Hash::Key& aattribute, Hash::Val *ameaning, | |
| void *) { | |
| return StrEqNc(aattribute.cstr(), CONTENT_TYPE_NAME); | |
| } | |
| static bool find_content_type_charset(const Hash::Key& aattribute, Hash::Val *ameaning, | |
| void *) { | |
| return StrEqNc(aattribute.cstr(), "charset"); | |
| } | |
| struct Mail_info { | struct Mail_info { |
| String *attribute_to_exclude; | String *attribute_to_exclude; |
| const char *charset; | |
| String *header; | String *header; |
| const String **from, **to; | const String **from, **to; |
| }; | }; |
| Line 170 static void add_header_attribute(const H | Line 180 static void add_header_attribute(const H |
| // append header line | // append header line |
| *mi.header << | *mi.header << |
| aattribute << ":" << | aattribute << ":" << |
| attributed_meaning_to_string(lmeaning, String::UL_MAIL_HEADER) << | attributed_meaning_to_string(lmeaning, String::UL_MAIL_HEADER). |
| cstr(String::UL_UNSPECIFIED, 0, mi.charset) << | |
| "\n"; | "\n"; |
| } | } |
| struct Seq_item { | struct Seq_item { |
| Line 213 static const String& letter_hash_to_stri | Line 224 static const String& letter_hash_to_stri |
| // prepare header: 'hash' without "body" | // prepare header: 'hash' without "body" |
| String& result=*new(pool) String(pool); | String& result=*new(pool) String(pool); |
| const char *charset=0; | |
| if(Value *content_type= | |
| static_cast<Value *>(letter_hash.first_that(find_content_type))) | |
| if(Hash *hash=content_type->get_hash()) | |
| if(Value *content_type_charset= | |
| static_cast<Value *>(hash->first_that(find_content_type_charset))) | |
| charset=content_type_charset->as_string().cstr(); | |
| // if(Hash *hash=ameaning)->get_hash())) | |
| // if(VString *vcharset=hash->get_string(String(pool, "charset | |
| *from=*to=0; | *from=*to=0; |
| Mail_info mail_info={ | Mail_info mail_info={ |
| /*excluding*/ body_name, | /*excluding*/ body_name, |
| charset, | |
| &result, | &result, |
| from, to | from, to |
| }; | }; |
| Line 383 static void _send(Request& r, const Stri | Line 408 static void _send(Request& r, const Stri |
| const String *from, *to; | const String *from, *to; |
| const String& letter=letter_hash_to_string(r, method_name, *hash, 0, &from, &to); | const String& letter=letter_hash_to_string(r, method_name, *hash, 0, &from, &to); |
| //r.write_assign_lang(*new(pool) VString(letter)); | r.write_assign_lang(*new(pool) VString(letter)); |
| sendmail(r, method_name, letter, from, to); | //sendmail(r, method_name, letter, from, to); |
| } | } |
| // initialize | // initialize |