Lines Matching refs:val
92 static zend_bool php_mail_build_headers_check_field_value(zval *val) in php_mail_build_headers_check_field_value() argument
95 zend_string *value = Z_STR_P(val); in php_mail_build_headers_check_field_value()
100 if (*(value->val+len) == '\r') { in php_mail_build_headers_check_field_value()
102 && *(value->val+len+1) == '\n' in php_mail_build_headers_check_field_value()
103 && (*(value->val+len+2) == ' ' || *(value->val+len+2) == '\t')) { in php_mail_build_headers_check_field_value()
109 if (*(value->val+len) == '\0') { in php_mail_build_headers_check_field_value()
124 if (*(key->val+len) < 33 || *(key->val+len) > 126 || *(key->val+len) == ':') { in php_mail_build_headers_check_field_name()
133 static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *val);
135 static void php_mail_build_headers_elem(smart_str *s, zend_string *key, zval *val) in php_mail_build_headers_elem() argument
137 switch(Z_TYPE_P(val)) { in php_mail_build_headers_elem()
143 if (php_mail_build_headers_check_field_value(val) != SUCCESS) { in php_mail_build_headers_elem()
144 … "Header field value (%s => %s) contains invalid chars or format", ZSTR_VAL(key), Z_STRVAL_P(val)); in php_mail_build_headers_elem()
149 smart_str_appends(s, Z_STRVAL_P(val)); in php_mail_build_headers_elem()
153 php_mail_build_headers_elems(s, key, val); in php_mail_build_headers_elem()
161 static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *val) in php_mail_build_headers_elems() argument
166 ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(val), tmp_key, tmp_val) { in php_mail_build_headers_elems()
184 zval *val; in php_mail_build_headers() local
189 ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(headers), idx, key, val) { in php_mail_build_headers()
198 PHP_MAIL_BUILD_HEADER_CHECK("orig-date", s, key, val); in php_mail_build_headers()
200 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
205 PHP_MAIL_BUILD_HEADER_CHECK("from", s, key, val); in php_mail_build_headers()
207 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
212 PHP_MAIL_BUILD_HEADER_CHECK("sender", s, key, val); in php_mail_build_headers()
214 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
219 PHP_MAIL_BUILD_HEADER_CHECK("reply-to", s, key, val); in php_mail_build_headers()
221 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
230 PHP_MAIL_BUILD_HEADER_CHECK("cc", s, key, val); in php_mail_build_headers()
232 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
237 PHP_MAIL_BUILD_HEADER_CHECK("bcc", s, key, val); in php_mail_build_headers()
239 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
244 PHP_MAIL_BUILD_HEADER_CHECK("message-id", s, key, val); in php_mail_build_headers()
246 PHP_MAIL_BUILD_HEADER_CHECK("references", s, key, val); in php_mail_build_headers()
248 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
253 PHP_MAIL_BUILD_HEADER_CHECK("in-reply-to", s, key, val); in php_mail_build_headers()
255 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
263 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
266 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
479 #define MAIL_RET(val) \ in php_mail() argument
483 return val; \ in php_mail()
506 len = spprintf(&tmp, 0, "[%s] %s%s", date_str->val, logline, PHP_EOL); in php_mail()