The following methods are currently available.
__construct($mailbox, $username, $password, $encryption)
open new imap connectionisConnected()
check whether the imap connection could be opened successfullygetError()
returns the last error messageselectFolder($folder)
select current foldergetFolders($seperator, $type)
@param string $separator. Default is '.' @param int $type. Has three meanings 0,1,2.If 0 return nested array, if 1 return an array of strings, if 2 return raw imap_list()setEmbed($val)
If true, embed all 'inline' images into body HTML, accesible in 'body_embed'countMessages()
count messages in current foldercountUnreadMessages()
count unread messages in current foldergetMessages($withbody = true, $standard = "UNSEEN")
get emails in current foldergetMessage($id)
get email by given idgetUnreadMessages($withbody = true)
get unread messages in current folderdeleteMessage($id)
delete message with given iddeleteMessages($ids)
delete messages with given ids (as array)moveMessage($id, $target)
move message with given id in new foldermoveMessages($ids, $target)
move messages with given ids (as array) in new foldersetUnseenMessage($id, $seen = true)
set unseen state of the message with given idgetAttachment($id, $index = 0)
get attachment of the message with given id (getMessages returns all available attachments)getQuota($user)
Retrieve the quota level settings, and usage statics per mailbox.getQuotaRoot($user)
Retrieve the quota level settings, and usage statics per mailbox.addFolder($name)
add new folder with given nameremoveFolder($name)
delete folder with fiven namerenameFolder($name, $newname)
rename folder with given namepurge()
move all emails in the current folder into trash. emails in trash and spam will be deletedsetEncoding()
Identify encoding by charset attribute in headerconvertToUtf8()
Apply encoding defined in headergetAllEmailAddresses()
returns all email addresses of all emails (for auto suggestion list)saveMessageInSent($header, $body)
save a sent message in sent foldergetMailboxStatistics()
returns statistics, see imap_mailboxmsginfosaveEmail($file , $id, $part)
saves an email to the $file filesaveEmailSafe($file , $id, $part, $streamFilter)
saves an email to the $file file. This is recommended for servers with low amounts of RAM. Stream filter is set to convert.base64-decode by defaultsaveAttachmetsMessagesBySubject($subject, $dir = null, $charset = null)
Save Attachmets Messages By SubjectgetBriefInfoMessages()
Get a short information about the messages in the current folder.sendMail()
Send a message via the adapter.getHeaderInfo($msgnumber)
Get the header info via the message number. http://php.net/manual/en/function.imap-headerinfo.php#refsect1-function.imap-headerinfo-returnvalues