Metadata-Version: 2.1
Name: dm-easy-email
Version: 0.1.1
Summary: Data mining Group develop utils
Home-page: http://gitlab.admin.bluemoon.com.cn/BigData-DataAlgorithm/dm-utils.git
Author: Shenxian Shi
Author-email: shishenxian@bluemoon.com.cn
License: MIT License        
        Copyright 2022 Bluemoon Algorithm        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Platform: UNKNOWN
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.md

# **邮件**
封装简单的邮件推送功能，支持发送单个或多个收件/抄送人，支持附件上传（未测试）

## **项目结构**
- dm-utils
  - LISENCE.md
  - README.md
  - setup.py
  - easy-email
    - \_\_init\_\_.py
    - easy_email.py
    - example.py
    - conf
      - email.yml

## **使用方法**


  ### **配置文件模板**
    
    sender:
      xxx@example.com
    passwd: 
      your_passwd
    receiver:
      - aaa@example.com
      - bbb@example.com
    subject:
      your_title
    # Params below could be None
    nickname:
      your_nickname
    cc:
      ccc@example.com


  ### **示例**
  
    from easy_email import Email
    from ruamel import yaml
    import os


    if __name__ == '__main__':
        print(os.getcwd())
        with open('conf/email.yml', 'r') as f:
            content = yaml.load(f, Loader=yaml.Loader)
        sender = content['sender']
        receiver = content['receiver']
        subject = content['subject']
        nickname = content['nickname']
        # file_path = 'conf/email.yml'
        passwd = content['passwd']
        cc = content['cc']
        email = Email(
            sender=sender, passwd=passwd,
            subject=subject, nickname=nickname, 
            receiver=receiver, cc=cc
            )
        body = 'Hello world'
        email.send(body)

## **开发日志**
2022-2-17
1. 完成邮件推送功能开发与测试，并推至仓库
2. 完成打包并发布到pypi
   


