Giter Site home page Giter Site logo

srml's Introduction

srml

Author: Barret, Jeefies
Url: Github, PyPI


Connections

SMTPConnect

A easy smtp connect class to connect smtp host.
Initialize with four params:
host: refers to the connect host, such as 'smtp.qq.com'.
mails: refers to the user's info, format in ('[email protected]', 'password').

Notice:
The password is the password for login the smtp, imap, pop hosts.
ssl: decide whether use ssl to connect or not.
port: the connect port of the host.

  • login
    login(email, passwd), if param email or passwd if not given, use the info recieve when create the instance.
  • send
    send(msg), bind with Message class.
  • close
    close(), disconnect with the host and quit.

Can use with SMTPConnect(...) as conn.
If with is used, this would automatic use .login method.

IMAPConnect

Almost the same as SMTPConnect.

  • login
    login(email, passwd), the same as SMTPConnect.
  • select_folder
    select_folder('Folder name'), select folder accordng to list_folders()
  • list_folders
    list_folders(), return all exists folders can be select.
  • close_folder
    close_folder(), close the current select folder.

    if need to unselect, use .client.unselect_folder()

  • search
    search(types=['ALL']), search the emails according to the types, default 'ALL'
  • fetch
    fetch(uid, types='BODY[]'), fetch the message according to the search returned uids.
  • fetchall
    fetchall(types='BODY[]'), return all message.
  • quit
    exit the connection.

POPConnect

See also srml.popclient.POPClient. Like poplib.POP or poplib.POP_SSL. more infomation, see python standard library


Parse

Parse the MIME message according to the bytes in.
shown body see Parse.body.
plain text see Parse.text.
params or files see Parse.get_params().
more see Parse.dict

File

A class help to save the file.


MailBox

The mix class for all connection
use help(MailBox) or MailBox.__init__.__doc__ for more details.


srml.mailG

the GUI version to use the email objects.
Use python -m jemail to show the GUI.

srml.mailCli

The cli version to use the email objects.


Change Log

2022.1.20:
Add a repo to Boarderbarret, for cooperation.
URL: Boarderbarret/learn-email

2022.1.23:
Rewrite ALL hylang to python code
By Jeefies

srml's People

Stargazers

 avatar  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.