Hi,

Here I am again, having problems with the c-client and the wrap around it,
this time with the imap_mail_compose()... To start out with, the imap
functions really need more documentation, I've been working with the imap
functions for about two weeks, and for almost each and every function, I've
been forced to go down to code level in both php_imap.c and the c-client...

This time I'm having problems naming the attachments using
imap_mail_compose()

If I inspect the php_imap.c code,

// start php_imap.c

if (zend_hash_find(Z_ARRVAL_PP(data), "type", sizeof("type"), (void **)
&pvalue)== SUCCESS) {
  convert_to_long_ex(pvalue);
  bod->type = (short) Z_LVAL_PP(pvalue);
}
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), "subtype", sizeof("subtype"), (void
**) &pvalue)== SUCCESS) {
  convert_to_string_ex(pvalue);
  bod->subtype = cpystr(Z_STRVAL_PP(pvalue));
}
if (zend_hash_find(Z_ARRVAL_PP(data), "id", sizeof("id"), (void **)
&pvalue)== SUCCESS) {
  convert_to_string_ex(pvalue);
  bod->id = cpystr(Z_STRVAL_PP(pvalue));
}
if (zend_hash_find(Z_ARRVAL_PP(data), "contents.data",
sizeof("contents.data"), (void **) &pvalue)== SUCCES$
  convert_to_string_ex(pvalue);
  bod->contents.text.data = (char *) fs_get(Z_STRLEN_PP(pvalue));
  memcpy(bod->contents.text.data, Z_STRVAL_PP(pvalue),
Z_STRLEN_PP(pvalue)+1);
  bod->contents.text.size = Z_STRLEN_PP(pvalue);
}
if (zend_hash_find(Z_ARRVAL_PP(data), "lines", sizeof("lines"), (void **)
&pvalue)== SUCCESS) {
  convert_to_long_ex(pvalue);
  bod->size.lines = Z_LVAL_PP(pvalue);
}
if (zend_hash_find(Z_ARRVAL_PP(data), "bytes", sizeof("bytes"), (void **)
&pvalue)== SUCCESS) {
  convert_to_long_ex(pvalue);
  bod->size.bytes = Z_LVAL_PP(pvalue);
}
if (zend_hash_find(Z_ARRVAL_PP(data), "md5", sizeof("md5"), (void **)
&pvalue)== SUCCESS) {
  convert_to_string_ex(pvalue);
  bod->md5 = cpystr(Z_STRVAL_PP(pvalue));
}

zend_hash_move_forward(Z_ARRVAL_PP(body));

// end php_imap.c

This would allow me to set the following body headers,

        type
        encoding
        subtype
        id
        contents.date
        lines
        bytes
        md5

Which are fine with me, but it's missing one really big function, and that
is Content-Disposition, without this, there is no way to name the
attachment.

Is this an upcoming feature, something I can do with the current versions or
just something that is not possible?


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to