Lines Matching refs:val
96 static zend_bool php_mail_build_headers_check_field_value(zval *val) in php_mail_build_headers_check_field_value() argument
99 zend_string *value = Z_STR_P(val); in php_mail_build_headers_check_field_value()
104 if (*(value->val+len) == '\r') { in php_mail_build_headers_check_field_value()
106 && *(value->val+len+1) == '\n' in php_mail_build_headers_check_field_value()
107 && (*(value->val+len+2) == ' ' || *(value->val+len+2) == '\t')) { in php_mail_build_headers_check_field_value()
113 if (*(value->val+len) == '\0') { in php_mail_build_headers_check_field_value()
128 if (*(key->val+len) < 33 || *(key->val+len) > 126 || *(key->val+len) == ':') { in php_mail_build_headers_check_field_name()
137 static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *val);
139 static void php_mail_build_headers_elem(smart_str *s, zend_string *key, zval *val) in php_mail_build_headers_elem() argument
141 switch(Z_TYPE_P(val)) { in php_mail_build_headers_elem()
147 if (php_mail_build_headers_check_field_value(val) != SUCCESS) { in php_mail_build_headers_elem()
148 … "Header field value (%s => %s) contains invalid chars or format", ZSTR_VAL(key), Z_STRVAL_P(val)); in php_mail_build_headers_elem()
153 smart_str_appends(s, Z_STRVAL_P(val)); in php_mail_build_headers_elem()
157 php_mail_build_headers_elems(s, key, val); in php_mail_build_headers_elem()
165 static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *val) in php_mail_build_headers_elems() argument
172 ZEND_HASH_FOREACH_KEY_VAL(HASH_OF(val), idx, tmp_key, tmp_val) { in php_mail_build_headers_elems()
190 zval *val; in php_mail_build_headers() local
195 ZEND_HASH_FOREACH_KEY_VAL(HASH_OF(headers), idx, key, val) { in php_mail_build_headers()
204 PHP_MAIL_BUILD_HEADER_CHECK("orig-date", s, key, val); in php_mail_build_headers()
206 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
211 PHP_MAIL_BUILD_HEADER_CHECK("from", s, key, val); in php_mail_build_headers()
213 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
218 PHP_MAIL_BUILD_HEADER_CHECK("sender", s, key, val); in php_mail_build_headers()
220 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
225 PHP_MAIL_BUILD_HEADER_CHECK("reply-to", s, key, val); in php_mail_build_headers()
227 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
236 PHP_MAIL_BUILD_HEADER_CHECK("cc", s, key, val); in php_mail_build_headers()
238 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
243 PHP_MAIL_BUILD_HEADER_CHECK("bcc", s, key, val); in php_mail_build_headers()
245 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
250 PHP_MAIL_BUILD_HEADER_CHECK("message-id", s, key, val); in php_mail_build_headers()
252 PHP_MAIL_BUILD_HEADER_CHECK("references", s, key, val); in php_mail_build_headers()
254 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
259 PHP_MAIL_BUILD_HEADER_CHECK("in-reply-to", s, key, val); in php_mail_build_headers()
261 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
269 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
272 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
485 #define MAIL_RET(val) \ in php_mail() argument
489 return val; \ in php_mail()
512 len = spprintf(&tmp, 0, "[%s] %s%s", date_str->val, logline, PHP_EOL); in php_mail()