Skip to main content

Function easing life :)

Project description

pynut - Laurent Tupin

It provides various functions to simplify the users life.

Installation

You can install the package from PyPI:

python -m pip install pynut-Email

The package is supported on Python 3.7 and above.

How to use

You can call a function as this example:

$ ----------------------------------------------------
>>> from pyNutTools import nutDate
>>> nutDate.today()

This is the libraries I am using with the package

$ ----------------------------------------------------
>>> exchangelib==4.7.2

Documentation

Temporary documentation for nutEmail :

DESIGN PATTERN: BUILDER for OUTLOOK / EXCHANGELIB
Allow you to manage all relating to Emails with few lines of code

from pyNut import nutEmail as email

1. Send an email with OUTLOOK

o_builder_emailSend =   email.c_Outlook_send(**dic_param)
o_otlk_Director =       email.c_otlk_Director(o_builder_emailSend)
o_otlk_Director.SendMail()
bl_success = o_otlk_Director._builder.bl_success
    OR
bl_success = email.fBl_SendMail_desPatt(**dic_param)

WHERE 

dic_param = dict(bl_draft = True, l_pathAttach=['path1_fileToEnclose'], str_message = 'Hello',
                 str_from='', str_to='', str_cc='', str_bcc='',str_subject='Subject')    

2. Download files from Received Email on Outlook

o_builder_emailDwld =   email.c_Outlook_dwld(**dic_param)
inst_Director =    email.c_otlk_Director(o_builder_emailDwld)
inst_Director.Download_fMail()

WHERE 

dic_param = dict(str_outAcctName = 'laurent@gmail.com', str_inbox = 'Inbox', l_folders = [],
                 str_subject = 'Sujet', str_to = '', str_cc = '', str_folder = 'PathForSaveFile',
                 str_File_startW = 'file_', str_File_endW = '_01.csv')

3. Download files from Received Email with Excahngelib (not on Outlook)

o_builder_emailDwld = 	email.c_Webmail_dwld(**dic_param)
inst_Director =  	    email.c_otlk_Director(o_builder_emailDwld)
inst_Director.Download_fMail()

WHERE 

dic_param = dict(str_outAcctName = 'laurent@gmail.com', str_pwd = '*****', str_inbox = 'Inbox', l_folders = [],
                 str_subject = 'Sujet', str_to = '', str_cc = '', str_folder = 'PathForSaveFile',
                 str_File_startW = 'file_', str_File_endW = '_01.csv')

END

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynut-Email-2.1.4.tar.gz (23.3 kB view hashes)

Uploaded Source

Built Distribution

pynut_Email-2.1.4-py3-none-any.whl (21.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page