note 35650 added to function.imap-mail-compose

From: Date: Tue, 09 Sep 2003 21:46:17 +0000
Subject: note 35650 added to function.imap-mail-compose
Groups: php.notes 
Request: Send a blank email to php-notes+get-55903@lists.php.net to get a copy of this message
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! ---- Manual Page -- http://www.php.net/manual/en/function.imap-mail-compose.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35650 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35650&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35650&report=yes

« previous php.notes (#55903) next »