Code Monkey home page Code Monkey logo

gmail_archiver.php's Introduction

INTRODUCTION
gmail_archiver.php is a small PHP script able to download all messages from a
given IMAP server.

REQUIREMENTS
  * Operating system: GNU/Linux
  * Packages: php5-cli php5-imap

LICENSE
gmail_archiver.php is released unter the conditions of the WTFPL license
without any warranty. See LICENSE file for more details.

INSTALLATION
Depending on how you obtained it copy or extract gmail_archiver.php into a
directory you have write access to.

USAGE
Go to the directory where you want to download your mails by issuing a cd
command in a command line shell, run the script and enter the data needed to
connect to Gmail (or other email service) via IMAP. Example (assuming that
you have put gmail_archiver.php into your home directory):

~$ mkdir my_mails
~$ cd my_mails
~/my_mails$ php ~/gmail_archiver.php
Server: imap.gmail.com
Port: 993
Account name: [email protected]
Password:

(Note: when you type your password it will not be displayed on the screen.)

The script will create a directory named after your account name in the
directory where you are running it. Inside that directory subdirectories will
be created according to your IMAP folders. You will find your mails in those
subdirectories after the script terminates.

Example:
~/my_mails$ find
.
./[email protected]
./[email protected]/INBOX
./[email protected]/INBOX/1234.txt
./[email protected]/INBOX/1235.txt
./[email protected]/INBOX/1236.txt
./[email protected]/a_label
./[email protected]/a_label/1.txt
./[email protected]/a_label/2.txt
./[email protected]/another_label
./[email protected]/another_label/42.txt
./[email protected]/another_label/43.txt

You can run the script automatically if you specify connection parameters
in the arguments.

~/my_mails$ php ~/gmail_archiver.php help
Usage: php gmail_archiver.php [IMAP server [port [account name [password]]]]

Note: be careful when running the script this way as your password might be
recorded into your bash history, etc. Specify your password in the command
line only if you are sure you know what you are doing!

gmail_archiver.php's People

Contributors

attilammagyar avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.