diff options
author | Chuck Hagenbuch <chagenbu@php.net> | 2001-05-24 03:06:10 +0000 |
---|---|---|
committer | Chuck Hagenbuch <chagenbu@php.net> | 2001-05-24 03:06:10 +0000 |
commit | 9434da33b502efb8a369eda2e02c601d719375da (patch) | |
tree | 220d0433a01f453e5305f3e7feb348314c41952a /ext/imap | |
parent | 3ffaa634a22e647a79a94c8ea6917946367c0611 (diff) | |
download | php-git-9434da33b502efb8a369eda2e02c601d719375da.tar.gz |
make it possible to set the CHARSET parameter with imap_mail_compose()
(Johan Ekenberg <johan@ekenberg.se>)
Diffstat (limited to 'ext/imap')
-rw-r--r-- | ext/imap/php_imap.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 544a591db5..5dec6850c9 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3266,6 +3266,14 @@ PHP_FUNCTION(imap_mail_compose) 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)); @@ -3344,6 +3352,14 @@ PHP_FUNCTION(imap_mail_compose) 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)); |