note 35650 deleted from function.imap-mail-compose by nlopess

From: Date: Tue, 11 May 2004 13:22:12 +0000
Subject: note 35650 deleted from function.imap-mail-compose by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-69457@lists.php.net to get a copy of this message
Note Submitter: thomas.hebinck@digionline.de ---- imap_mail_compose also modifies the body, if there are attachments. The filenames get lost. So the code looks like this (I hope, there is enough memory): $temp_env=unserialize(serialize($envelope)); $temp_body=unserialize(serialize($body)); $mail=imap_mail_compose($temp_env,$temp_body); unset($temp_env); unset($temp_body); list($t_header,$t_body)=split("\r\n\r\n",$mail,2); $t_header=str_replace("\r",'',$t_header); $result=(bool)imap_mail($to,$subject,$t_body,$t_header); $envelope['to']=$to; $envelope['subject']=$subject; $mail=imap_mail_compose($envelope,$body); imap_append($this->connection, $this->p_server . 'INBOX.Sent',$mail); Good luck!

« previous php.notes (#69457) next »