}
/* message body */
- if (!message_len) {
+ if (!ZSTR_LEN(message)) {
/* this is not really an error, so it is allowed. */
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "No message string in mail command");
+ php_error_docref(NULL, E_WARNING, "No message string in mail command");
- message = NULL;
}
- if (_php_imap_mail(to, subject, message, headers, cc, bcc, rpath TSRMLS_CC)) {
+ if (_php_imap_mail(ZSTR_VAL(to), ZSTR_VAL(subject), ZSTR_VAL(message), headers?ZSTR_VAL(headers):NULL, cc?ZSTR_VAL(cc):NULL,
+ bcc?ZSTR_VAL(bcc):NULL, rpath?ZSTR_VAL(rpath):NULL)) {
RETURN_TRUE;
} else {
RETURN_FALSE;