cvs: php4 /ext/imap php_imap.c

From: Date: Thu, 24 May 2001 03:06:10 +0000
Subject: cvs: php4 /ext/imap php_imap.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5975@lists.php.net to get a copy of this message
chagenbu Wed May 23 20:06:10 2001 EDT Modified files: /php4/ext/imap php_imap.c Log: make it possible to set the CHARSET parameter with imap_mail_compose() (Johan Ekenberg <johan@ekenberg.se>) Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.78 php4/ext/imap/php_imap.c:1.79 --- php4/ext/imap/php_imap.c:1.78 Mon May 14 11:24:27 2001 +++ php4/ext/imap/php_imap.c Wed May 23 20:06:10 2001 @@ -25,7 +25,7 @@ | PHP 4.0 updates: Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.78 2001/05/14 18:24:27 vlad Exp $ */ +/* $Id: php_imap.c,v 1.79 2001/05/24 03:06:10 chagenbu Exp $ */ #define IMAP41 @@ -3266,6 +3266,14 @@ convert_to_long_ex(pvalue); bod->encoding = (short) Z_LVAL_PP(pvalue); } + if (zend_hash_find(Z_ARRVAL_PP(data), "charset", sizeof("charset"), (void **) &pvalue)== SUCCESS) { + convert_to_string_ex(pvalue); + tmp_param = mail_newbody_parameter(); + tmp_param->value = cpystr(Z_STRVAL_PP(pvalue)); + tmp_param->attribute = "CHARSET"; + tmp_param->next = bod->parameter; + bod->parameter = tmp_param; + } if (zend_hash_find(Z_ARRVAL_PP(data), "subtype", sizeof("subtype"), (void **) &pvalue)== SUCCESS) { convert_to_string_ex(pvalue); bod->subtype = cpystr(Z_STRVAL_PP(pvalue)); @@ -3343,6 +3351,14 @@ if (zend_hash_find(Z_ARRVAL_PP(data), "encoding", sizeof("encoding"), (void **) &pvalue)== SUCCESS) { convert_to_long_ex(pvalue); bod->encoding = (short) Z_LVAL_PP(pvalue); + } + if (zend_hash_find(Z_ARRVAL_PP(data), "charset", sizeof("charset"), (void **) &pvalue)== SUCCESS) { + convert_to_string_ex(pvalue); + tmp_param = mail_newbody_parameter(); + tmp_param->value = cpystr(Z_STRVAL_PP(pvalue)); + tmp_param->attribute = "CHARSET"; + tmp_param->next = bod->parameter; + bod->parameter = tmp_param; } if (zend_hash_find(Z_ARRVAL_PP(data), "subtype", sizeof("subtype"), (void **) &pvalue)== SUCCESS) { convert_to_string_ex(pvalue);

« previous php.cvs (#5975) next »