note 83533 added to function.imap-body

From: Date: Fri, 30 May 2008 15:12:07 +0000
Subject: note 83533 added to function.imap-body
Groups: php.notes 
Request: Send a blank email to php-notes+get-140005@lists.php.net to get a copy of this message
The code below will read all the messages in a box/folder. See the imap_sort function page for more info on sorting the messages. In the example I am using my domain http://altjira.co.uk. Just replace this and add in your user and pass. <?php $host = '{mail.altjira.co.uk/notls/imap4}INBOX'; $user = 'me+altjira.co.uk'; $pass = 'mypass'; $imap = imap_open( $host, $user, $pass ); $msgs = imap_sort( $imap, SORTARRIVAL, 1 ); foreach( $msgs as $msg ) { $msg_body = imap_body( $imap, $msg ); echo $msg_body . "\n\n"; } imap_close( $imap ); ?> ---- Server IP: 92.48.74.199 Probable Submitter: 217.43.72.226 ---- Manual Page -- http://www.php.net/manual/en/function.imap-body.php Edit -- https://master.php.net/note/edit/83533 Del: integrated -- https://master.php.net/note/delete/83533/integrated Del: useless -- https://master.php.net/note/delete/83533/useless Del: bad code -- https://master.php.net/note/delete/83533/bad+code Del: spam -- https://master.php.net/note/delete/83533/spam Del: non-english -- https://master.php.net/note/delete/83533/non-english Del: in docs -- https://master.php.net/note/delete/83533/in+docs Del: other reasons-- https://master.php.net/note/delete/83533 Reject -- https://master.php.net/note/reject/83533 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140005) next »