Download the PHP package laswitchtech/php-imap without Composer

On this page you can find all versions of the php package laswitchtech/php-imap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-imap

phpIMAP - [DEPRECATED] - Use coreIMAP instead

License GitHub repo size GitHub top language Version

Description

phpIMAP is a PHP library that provides an easy-to-use interface for interacting with IMAP email servers. It includes two main classes: the Message class and the Attachment class.

The Message class allows you to retrieve and manipulate email messages from an IMAP server. It provides methods for retrieving the message headers, body, and attachments, as well as for marking messages as read or deleted. Additionally, it includes a constructor method that takes an email message as its input and parses it into a Message object.

The Attachment class is used to handle email attachments. It includes methods for identifying the attachment's filename, type, and encoding, as well as for retrieving and saving the attachment's content. This class is typically used in conjunction with the Message class's getAttachments method, which retrieves all attachments associated with a given email message.

Features

Why you might need it

The library provides a simple and powerful way to work with IMAP email servers in PHP, allowing developers to easily retrieve, manipulate, and store email messages and attachments.

Can I use this?

Sure!

License

This software is distributed under the GNU General Public License v3.0 license. Please read LICENSE for information on the software availability and distribution.

Requirements

PHP >= 5.5.0

Security

Please disclose any vulnerabilities found responsibly – report security issues to the maintainers privately.

Installation

Using Composer:

How do I use it?

Examples

Initialize

Methods

To make it easier, we will assume you have already initialized the class in .

phpIMAP

config()

This method allows you to change some internal configurations such as log level.

connect()

This method creates a connection to an IMAP server.

close()

This method close an active connection of an IMAP server.

login()

This method allows to test a connection to an IMAP server.

isConnected()

This method return a boolean indicating if a connection is currently active or not.

getUsername()

This method returns the username of the active connection.

getHost()

This method returns the host of the active connection.

getFolders()

This method returns a list of folders available.

setFolder()

This method selects a folder.

createFolder()

This method creates a folder.

deleteFolder()

This method deletes a folder.

getMessages()

This method returns a list of messages in the selected folder.

Message

getTo()

This provides all TO addresses of a message.

getReplyTo()

This provides all REPLY-TO addresses of a message.

getFrom()

This provides all FROM addresses of a message.

getSender()

This provides all SENDER addresses of a message.

getCc()

This provides all CC addresses of a message.

getBcc()

This provides all BCC addresses of a message.

getUid()

This returns the UID of a message.

getId()

This returns the Message-Id of a message.

getSubject()

This returns the Subject of a message.

getDate()

This returns the Date of a message.

getBody()

This returns the Body of a message. HTML is returned if available, otherwise TEXT is returned.

read()

Set Seen flag on message.

unread()

Clear Seen flag on message.

flag()

Set Flagged flag on message.

unflag()

Clear Flagged flag on message.

draft()

Set Draft flag on message.

undraft()

Clear Draft flag on message.

answer()

Set Answered flag on message.

unanswer()

Clear Answered flag on message.

size()

Get the size of the message in bytes.

isRead()

Check if the flag Seen is set on message.

isFlagged()

Check if the flag Flagged is set on message.

isRecent()

Check if the flag Recent is set on message.

isAnswered()

Check if the flag Answered is set on message.

isDraft()

Check if the flag Draft is set on message.

isDeleted()

Check if the flag Deleted is set on message.

delete()

This will delete the message.

copy()

Copy this message to a different folder.

move()

Move this message to a different folder.

save()

This will save a message locally. Returns the file path.

getAttachments()

This method returns a list of attachments in the message.

Attachment

getDisposition()

This returns the Disposition of an attachment.

getEncoding()

This returns the Encoding of an attachment.

getId()

This returns the Content-Id of an attachment.

getFilename()

This returns the Filename of an attachment.

getFiletype()

This returns the Filetype of an attachment.

getContentType()

This returns the Content-Type of an attachment.

getContent()

This returns the Content of an attachment as a blob of data. It will also decode the data if an encoding is found.

save()

This will save an attachment locally. Returns the file path.


All versions of php-imap with dependencies

PHP Build Version
Package Version
Requires laswitchtech/php-logger Version ^1.0
laswitchtech/php-net Version ^1.0
laswitchtech/php-configurator Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laswitchtech/php-imap contains the following files

Loading the files please wait ....