|
diff --git a/docs/searchindex.js b/docs/searchindex.js
index 34b2560..9ce1938 100644
--- a/docs/searchindex.js
+++ b/docs/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["Gmail Connector", "Welcome to Gmail Connector\u2019s documentation!"], "terms": {"python": 0, "ani": 0, "folder": [0, 1], "As": 0, "mai": 0, "30": 0, "2022": 0, "googl": 0, "longer": 0, "support": 0, "third": 0, "parti": 0, "applic": 0, "access": 0, "account": 0, "onli": [0, 1], "us": [0, 1], "usernam": [0, 1], "password": [0, 1], "which": [0, 1], "wa": [0, 1], "origin": 0, "avail": [0, 1], "through": [0, 1], "lesssecureapp": 0, "an": [0, 1], "altern": 0, "approach": 0, "i": [0, 1], "gener": [0, 1], "apppassword": 0, "instead": 0, "refer": [0, 1], "http": [0, 1], "com": [0, 1], "answer": [0, 1], "6010255": 0, "pip": 0, "environ": 0, "variabl": 0, "can": [0, 1], "load": 0, "from": [0, 1], "file": [0, 1], "For": 0, "authent": [0, 1], "gmail_us": [0, 1], "gmail_pass": [0, 1], "account_password": 0, "outbound": 0, "recipi": [0, 1], "phone": [0, 1], "1234567890": 0, "import": 0, "gmailconnector": [0, 1], "gc": 0, "sms_object": 0, "sendsm": [0, 1], "encrypt": [0, 1], "ssl": [0, 1], "auth": 0, "happen": 0, "befor": [0, 1], "instanti": [0, 1], "separ": 0, "assert": 0, "ok": [0, 1], "bodi": [0, 1], "respons": [0, 1], "send_sm": [0, 1], "11234567890": [0, 1], "messag": [0, 1], "test": 0, "sms_gatewai": [0, 1], "smsgatewai": 0, "verizon": 0, "delete_s": [0, 1], "true": [0, 1], "set": [0, 1], "fals": [0, 1], "keep": 0, "sent": 0, "json": 0, "print": [0, 1], "more": 0, "warn": 0, "": 0, "gatewai": [0, 1], "ha": [0, 1], "payload": 0, "limit": 0, "so": 0, "recommend": 0, "break": 0, "larger": 0, "multipl": [0, 1], "subject": [0, 1], "default": [0, 1], "carrier": [0, 1], "t": 0, "mobil": [0, 1], "boost": 0, "cricket": 0, "u": 0, "cellular": 0, "_": 0, "tmomail": [0, 1], "net": [0, 1], "sinc": [0, 1], "delet": 0, "boolean": [0, 1], "flag": [0, 1], "sentitem": [0, 1], "note": [0, 1], "If": 0, "known": 0, "ensur": 0, "proper": 0, "deliveri": 0, "mail_object": 0, "sendemail": [0, 1], "send_email": [0, 1], "beforehand": 0, "basic": 0, "howdi": 0, "To": 0, "verifi": 0, "requir": 0, "smtp": [0, 1], "port": [0, 1], "25": [0, 1], "email_addr": 0, "someon": 0, "exampl": [0, 1], "validation_result": 0, "validate_email": [0, 1], "email_address": [0, 1], "valid": 0, "found": 0, "address": 0, "elif": 0, "invalid": [0, 1], "els": 0, "incomplet": 0, "couldn": 0, "mostli": 0, "becaus": 0, "block": [0, 1], "isp": 0, "o": 0, "differ": 0, "case": 0, "add": [0, 1], "attach": [0, 1], "without": [0, 1], "custom": 0, "filenam": [0, 1], "imag": 0, "path": [0, 1], "join": 0, "getcwd": 0, "listdir": 0, "name": [0, 1], "appl": 0, "flower": 0, "balloon": 0, "1": [0, 1], "2": [0, 1], "dictionari": [0, 1], "custom_attach": [0, 1], "dict": [0, 1], "zip": 0, "3": 0, "list": [0, 1], "4": 0, "singl": 0, "random_apple_xroamutiypa": 0, "jpeg": 0, "blank": 0, "html": [0, 1], "format": [0, 1], "inlin": 0, "public": 0, "src": 0, "itself": [0, 1], "sender": [0, 1], "cc": [0, 1], "whom": [0, 1], "d": [0, 1], "bcc": [0, 1], "than": 0, "one": [0, 1], "wrap": 0, "username1": 0, "username2": 0, "datetim": [0, 1], "reader": 0, "reademail": [0, 1], "all": [0, 1], "filter1": 0, "condit": [0, 1], "date": 0, "year": 0, "2010": 0, "month": 0, "5": [0, 1], "dai": 0, "filter2": 0, "secur": 0, "alert": 0, "filter3": 0, "categori": [0, 1], "not_delet": 0, "filter": [0, 1], "appli": 0, "same": [0, 1], "time": [0, 1], "each_mail": 0, "read_mail": [0, 1], "humanize_datetim": [0, 1], "get": [0, 1], "object": [0, 1], "date_tim": 0, "sender_email": 0, "precommit": 0, "doc": 0, "creation": 0, "ar": 0, "run": 0, "everi": 0, "commit": 0, "sphinx": 0, "pre": 0, "20": 0, "0": [0, 1], "recommonmark": 0, "7": 0, "usag": 0, "changelog": 0, "revers": 0, "f": 0, "release_not": 0, "rst": 0, "releas": 0, "org": 0, "project": 0, "thevickypedia": 0, "github": 0, "io": [0, 1], "vignesh": 0, "sivanandha": 0, "rao": 0, "under": 0, "mit": 0, "instal": 1, "env": 1, "var": 1, "licens": 1, "copyright": 1, "class": 1, "option": 1, "str": 1, "none": 1, "timeout": 1, "union": 1, "int": 1, "float": 1, "10": 1, "gmail_host": 1, "__str__": 1, "tl": 1, "initi": 1, "messeng": 1, "number": 1, "provid": 1, "necessari": 1, "arg": 1, "paramet": 1, "lib": 1, "connect": 1, "type": 1, "hostnam": 1, "server": 1, "properti": 1, "return": 1, "A": 1, "statu": 1, "user": 1, "create_ssl_connect": 1, "host": 1, "noreturn": 1, "creat": 1, "create_tls_connect": 1, "static": 1, "generate_address": 1, "digit": 1, "form": 1, "endpoint": 1, "bool": 1, "text": 1, "destin": 1, "content": 1, "line": 1, "take": 1, "argument": 1, "item": 1, "encod": 1, "ascii": 1, "ignor": 1, "decod": 1, "thi": 1, "done": 1, "special": 1, "charact": 1, "like": 1, "rais": 1, "unicodeencodeerror": 1, "try": 1, "other": 1, "includ": 1, "replac": 1, "xmlcharrefreplac": 1, "validate_phon": 1, "pass": 1, "dure": 1, "sms_delet": 1, "deletes": 1, "kwarg": 1, "particular": 1, "right": 1, "after": 1, "invok": 1, "thread_executor": 1, "sweep": 1, "depend": 1, "exist": 1, "item_id": 1, "byte": 1, "thread": 1, "just": 1, "id": 1, "defin": 1, "587": 1, "multipart_messag": 1, "html_bodi": 1, "mimemultipart": 1, "multipart": 1, "given": 1, "version": 1, "pathlik": 1, "fail_if_attach_fail": 1, "filepath": 1, "kei": 1, "valu": 1, "restrict": 1, "fail": 1, "read_email": 1, "inbox": 1, "imap": 1, "yield": 1, "unread": 1, "where": 1, "have": 1, "imapcli": 1, "readthedoc": 1, "en": 1, "_modul": 1, "xlist_fold": 1, "broad": 1, "claus": 1, "catch": 1, "login": 1, "error": 1, "imaplib": 1, "get_info": 1, "response_part": 1, "tupl": 1, "dt_flag": 1, "extract": 1, "receiv": 1, "part": 1, "whether": 1, "convert": 1, "human": 1, "readabl": 1, "inform": 1, "iter": 1, "unseen": 1, "search": 1, "api": 1, "contain": 1, "code": 1, "confirm": 1, "method": 1, "debug": 1, "smtp_check": 1, "logger": 1, "log": 1, "deliv": 1, "abil": 1, "second": 1, "wait": 1, "result": 1, "enabl": 1, "check": 1, "bring": 1, "your": 1, "own": 1, "clearli": 1, "mx": 1, "record": 1, "temporari": 1, "emailaddress": 1, "validateaddress": 1, "split": 1, "domin": 1, "further": 1, "ipv4address": 1, "ipv6address": 1, "get_mx_record": 1, "mail": 1, "exchang": 1, "fqdn": 1, "fulli": 1, "qualifi": 1, "ip": 1, "authorit": 1, "non": 1, "section": 1, "addressformaterror": 1, "invaliddomain": 1, "notmailserv": 1, "unresponsivemailserv": 1, "unrespons": 1, "index": 1, "modul": 1, "page": 1}, "objects": {"gmailconnector": [[1, 0, 0, "-", "read_email"], [1, 0, 0, "-", "send_email"], [1, 0, 0, "-", "send_sms"], [1, 0, 0, "-", "sms_deleter"]], "gmailconnector.read_email": [[1, 1, 1, "", "ReadEmail"]], "gmailconnector.read_email.ReadEmail": [[1, 2, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "get_info"], [1, 3, 1, "", "instantiate"], [1, 3, 1, "", "read_mail"]], "gmailconnector.send_email": [[1, 1, 1, "", "SendEmail"]], "gmailconnector.send_email.SendEmail": [[1, 2, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "create_tls_connection"], [1, 3, 1, "", "multipart_message"], [1, 3, 1, "", "send_email"]], "gmailconnector.send_sms": [[1, 1, 1, "", "SendSMS"]], "gmailconnector.send_sms.SendSMS": [[1, 2, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "create_tls_connection"], [1, 3, 1, "", "generate_address"], [1, 3, 1, "", "send_sms"], [1, 3, 1, "", "validate_phone"]], "gmailconnector.sms_deleter": [[1, 1, 1, "", "DeleteSent"]], "gmailconnector.sms_deleter.DeleteSent": [[1, 3, 1, "", "delete_sent"], [1, 3, 1, "", "thread_executor"]], "gmailconnector.validator": [[1, 0, 0, "-", "address"], [1, 0, 0, "-", "domain"], [1, 0, 0, "-", "exceptions"], [1, 0, 0, "-", "validate_email"]], "gmailconnector.validator.address": [[1, 1, 1, "", "EmailAddress"]], "gmailconnector.validator.address.EmailAddress": [[1, 2, 1, "", "domain"], [1, 2, 1, "", "email"], [1, 2, 1, "", "user"]], "gmailconnector.validator.domain": [[1, 4, 1, "", "get_mx_records"]], "gmailconnector.validator.exceptions": [[1, 5, 1, "", "AddressFormatError"], [1, 5, 1, "", "InvalidDomain"], [1, 5, 1, "", "NotMailServer"], [1, 5, 1, "", "UnresponsiveMailServer"]], "gmailconnector.validator.validate_email": [[1, 4, 1, "", "validate_email"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:property", "3": "py:method", "4": "py:function", "5": "py:exception"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "property", "Python property"], "3": ["py", "method", "Python method"], "4": ["py", "function", "Python function"], "5": ["py", "exception", "Python exception"]}, "titleterms": {"gmail": [0, 1], "connector": [0, 1], "instal": 0, "env": 0, "var": 0, "send": [0, 1], "sm": [0, 1], "addit": 0, "arg": 0, "email": [0, 1], "read": [0, 1], "lint": 0, "chang": 0, "log": 0, "pypi": 0, "modul": 0, "runbook": 0, "repositori": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "me": 1, "delet": 1, "sent": 1, "valid": 1, "address": 1, "domain": 1, "custom": 1, "except": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}})
\ No newline at end of file
+Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["Gmail Connector", "Welcome to Gmail Connector\u2019s documentation!"], "terms": {"python": 0, "ani": [0, 1], "folder": [0, 1], "As": 0, "mai": 0, "30": 0, "2022": 0, "googl": 0, "longer": 0, "support": 0, "third": 0, "parti": 0, "applic": 0, "access": [0, 1], "account": 0, "onli": [0, 1], "us": [0, 1], "usernam": [0, 1], "password": [0, 1], "which": [0, 1], "wa": [0, 1], "origin": 0, "avail": [0, 1], "through": [0, 1], "lesssecureapp": 0, "an": [0, 1], "altern": 0, "approach": 0, "i": [0, 1], "gener": [0, 1], "apppassword": 0, "instead": 0, "refer": [0, 1], "http": [0, 1], "com": [0, 1], "answer": [0, 1], "6010255": 0, "pip": 0, "environ": 0, "variabl": [0, 1], "can": [0, 1], "load": 0, "from": [0, 1], "file": [0, 1], "For": 0, "authent": [0, 1], "gmail_us": [0, 1], "gmail_pass": [0, 1], "account_password": 0, "outbound": 0, "recipi": [0, 1], "phone": [0, 1], "1234567890": 0, "import": [0, 1], "gmailconnector": [0, 1], "gc": 0, "sms_object": 0, "sendsm": [0, 1], "encrypt": [0, 1], "ssl": [0, 1], "auth": 0, "happen": 0, "befor": [0, 1], "instanti": [0, 1], "separ": 0, "assert": 0, "ok": [0, 1], "bodi": [0, 1], "respons": [0, 1], "send_sm": [0, 1], "11234567890": [0, 1], "messag": [0, 1], "test": 0, "sms_gatewai": [0, 1], "smsgatewai": [0, 1], "verizon": [0, 1], "delete_s": [0, 1], "true": [0, 1], "set": [0, 1], "fals": [0, 1], "keep": 0, "sent": 0, "json": [0, 1], "print": 0, "more": 0, "warn": 0, "": 0, "gatewai": [0, 1], "ha": [0, 1], "payload": 0, "limit": 0, "so": [0, 1], "recommend": 0, "break": 0, "larger": 0, "multipl": [0, 1], "subject": [0, 1], "default": [0, 1], "carrier": [0, 1], "t": 0, "mobil": [0, 1], "boost": [0, 1], "cricket": [0, 1], "u": 0, "cellular": 0, "_": 0, "tmomail": [0, 1], "net": [0, 1], "sinc": [0, 1], "delet": 0, "boolean": [0, 1], "flag": [0, 1], "sentitem": [0, 1], "note": [0, 1], "If": 0, "known": 0, "ensur": 0, "proper": 0, "deliveri": 0, "mail_object": 0, "sendemail": [0, 1], "send_email": [0, 1], "beforehand": 0, "basic": 0, "howdi": 0, "To": 0, "verifi": 0, "requir": 0, "smtp": [0, 1], "port": [0, 1], "25": [0, 1], "email_addr": 0, "someon": 0, "exampl": [0, 1], "validation_result": 0, "validate_email": [0, 1], "email_address": [0, 1], "valid": 0, "found": 0, "address": 0, "elif": 0, "invalid": [0, 1], "els": 0, "incomplet": 0, "couldn": 0, "mostli": 0, "becaus": 0, "block": [0, 1], "isp": 0, "o": 0, "differ": [0, 1], "case": 0, "add": [0, 1], "attach": [0, 1], "without": [0, 1], "custom": 0, "filenam": [0, 1], "imag": 0, "path": [0, 1], "join": 0, "getcwd": 0, "listdir": 0, "name": [0, 1], "appl": 0, "flower": 0, "balloon": 0, "1": [0, 1], "2": [0, 1], "dictionari": [0, 1], "custom_attach": [0, 1], "dict": [0, 1], "zip": 0, "3": 0, "list": [0, 1], "4": 0, "singl": 0, "random_apple_xroamutiypa": 0, "jpeg": 0, "blank": 0, "html": [0, 1], "format": [0, 1], "inlin": 0, "public": 0, "src": 0, "itself": [0, 1], "sender": [0, 1], "cc": [0, 1], "whom": [0, 1], "d": [0, 1], "bcc": [0, 1], "than": [0, 1], "one": 0, "wrap": 0, "username1": 0, "username2": 0, "datetim": [0, 1], "reader": 0, "reademail": [0, 1], "all": [0, 1], "filter1": 0, "condit": [0, 1], "date": [0, 1], "year": 0, "2010": 0, "month": 0, "5": [0, 1], "dai": 0, "filter2": 0, "secur": 0, "alert": 0, "filter3": 0, "categori": [0, 1], "not_delet": [0, 1], "filter": [0, 1], "appli": 0, "same": [0, 1], "time": [0, 1], "each_mail": 0, "read_mail": [0, 1], "humanize_datetim": [0, 1], "get": [0, 1], "object": [0, 1], "date_tim": 0, "sender_email": 0, "precommit": 0, "doc": 0, "creation": 0, "ar": 0, "run": 0, "everi": 0, "commit": 0, "sphinx": 0, "pre": 0, "20": 0, "0": [0, 1], "recommonmark": 0, "7": 0, "usag": 0, "changelog": 0, "revers": 0, "f": 0, "release_not": 0, "rst": 0, "releas": 0, "org": 0, "project": 0, "thevickypedia": 0, "github": 0, "io": [0, 1], "vignesh": 0, "sivanandha": 0, "rao": 0, "under": 0, "mit": 0, "instal": 1, "env": 1, "var": 1, "licens": 1, "copyright": 1, "class": 1, "str": 1, "none": 1, "timeout": 1, "union": 1, "int": 1, "float": 1, "10": 1, "gmail_host": 1, "__str__": 1, "tl": 1, "initi": 1, "messeng": 1, "number": 1, "provid": 1, "necessari": 1, "arg": 1, "paramet": 1, "lib": 1, "connect": 1, "type": 1, "hostnam": 1, "server": 1, "properti": 1, "return": 1, "A": 1, "statu": 1, "user": 1, "create_ssl_connect": 1, "host": 1, "noreturn": 1, "creat": 1, "create_tls_connect": 1, "static": 1, "generate_address": 1, "digit": 1, "form": 1, "endpoint": 1, "bool": 1, "text": 1, "destin": 1, "content": 1, "line": 1, "take": 1, "argument": 1, "item": 1, "encod": 1, "ascii": 1, "ignor": 1, "decod": 1, "thi": 1, "done": 1, "special": 1, "charact": 1, "like": 1, "rais": 1, "unicodeencodeerror": 1, "try": 1, "other": 1, "includ": 1, "replac": 1, "xmlcharrefreplac": 1, "validate_phon": 1, "pass": 1, "dure": 1, "sms_delet": 1, "deletes": 1, "kwarg": 1, "particular": 1, "right": 1, "after": 1, "invok": 1, "thread_executor": 1, "sweep": 1, "depend": 1, "exist": 1, "item_id": 1, "byte": 1, "thread": 1, "just": 1, "id": 1, "defin": 1, "587": 1, "multipart_messag": 1, "html_bodi": 1, "mimemultipart": 1, "multipart": 1, "given": 1, "version": 1, "pathlik": 1, "fail_if_attach_fail": 1, "filepath": 1, "kei": 1, "valu": 1, "restrict": 1, "fail": 1, "read_email": 1, "inbox": 1, "imap": 1, "yield": 1, "accord": 1, "where": 1, "have": 1, "imapcli": 1, "readthedoc": 1, "en": 1, "_modul": 1, "xlist_fold": 1, "broad": 1, "claus": 1, "catch": 1, "login": 1, "error": 1, "imaplib": 1, "get_info": 1, "response_part": 1, "tupl": 1, "dt_flag": 1, "extract": 1, "receiv": 1, "part": 1, "whether": 1, "convert": 1, "human": 1, "readabl": 1, "inform": 1, "iter": 1, "unseen": 1, "search": 1, "api": 1, "contain": 1, "code": 1, "match": 1, "criteria": 1, "method": 1, "debug": 1, "smtp_check": 1, "logger": 1, "log": 1, "deliv": 1, "abil": 1, "second": 1, "wait": 1, "result": 1, "enabl": 1, "check": 1, "bring": 1, "your": 1, "own": 1, "clearli": 1, "mx": 1, "record": 1, "temporari": 1, "emailaddress": 1, "validateaddress": 1, "split": 1, "domin": 1, "further": 1, "ipv4address": 1, "ipv6address": 1, "get_mx_record": 1, "mail": 1, "exchang": 1, "fqdn": 1, "fulli": 1, "qualifi": 1, "ip": 1, "authorit": 1, "non": 1, "section": 1, "addressformaterror": 1, "invaliddomain": 1, "notmailserv": 1, "unresponsivemailserv": 1, "unrespons": 1, "enum": 1, "wrapper": 1, "_generate_next_value_": 1, "start": 1, "count": 1, "last_valu": 1, "_member_map_": 1, "_member_names_": 1, "_member_type_": 1, "alia": 1, "_value2member_map_": 1, "mm": 1, "att": 1, "vtext": 1, "smsmyboostmobil": 1, "cricketwireless": 1, "uscc": 1, "tmobil": 1, "uscellular": 1, "while": 1, "NOT": 1, "seen": 1, "retriev": 1, "small": 1, "size": 1, "smaller": 1, "present": 1, "choos": 1, "draft": 1, "spam": 1, "star": 1, "trash": 1, "turn": 1, "insert": 1, "pair": 1, "member": 1, "un": 1, "extra": 1, "base": 1, "index": 1, "modul": 1, "page": 1}, "objects": {"gmailconnector.models": [[1, 0, 0, "-", "config"], [1, 0, 0, "-", "options"], [1, 0, 0, "-", "responder"]], "gmailconnector.models.config": [[1, 1, 1, "", "Encryption"], [1, 1, 1, "", "SMSGateway"]], "gmailconnector.models.config.Encryption": [[1, 2, 1, "", "SSL"], [1, 2, 1, "", "TLS"], [1, 3, 1, "", "_generate_next_value_"], [1, 2, 1, "", "_member_map_"], [1, 2, 1, "", "_member_names_"], [1, 2, 1, "", "_member_type_"], [1, 2, 1, "", "_value2member_map_"]], "gmailconnector.models.config.SMSGateway": [[1, 2, 1, "", "all"], [1, 2, 1, "", "att"], [1, 2, 1, "", "boost"], [1, 2, 1, "", "cricket"], [1, 2, 1, "", "tmobile"], [1, 2, 1, "", "uscellular"], [1, 2, 1, "", "verizon"]], "gmailconnector.models.options": [[1, 1, 1, "", "Category"], [1, 1, 1, "", "Condition"], [1, 1, 1, "", "Folder"]], "gmailconnector.models.options.Category": [[1, 2, 1, "", "all"], [1, 2, 1, "", "flagged"], [1, 2, 1, "", "not_deleted"], [1, 2, 1, "", "seen"], [1, 2, 1, "", "unseen"]], "gmailconnector.models.options.Condition": [[1, 3, 1, "", "since"], [1, 3, 1, "", "small"], [1, 3, 1, "", "subject"], [1, 3, 1, "", "text"]], "gmailconnector.models.options.Folder": [[1, 2, 1, "", "all"], [1, 2, 1, "", "drafts"], [1, 2, 1, "", "important"], [1, 2, 1, "", "inbox"], [1, 2, 1, "", "sent"], [1, 2, 1, "", "spam"], [1, 2, 1, "", "starred"], [1, 2, 1, "", "trash"]], "gmailconnector.models.responder": [[1, 1, 1, "", "Email"], [1, 1, 1, "", "Response"]], "gmailconnector.models.responder.Response": [[1, 4, 1, "", "body"], [1, 4, 1, "", "count"], [1, 4, 1, "", "extra"], [1, 3, 1, "", "json"], [1, 4, 1, "", "ok"], [1, 4, 1, "", "status"]], "gmailconnector": [[1, 0, 0, "-", "read_email"], [1, 0, 0, "-", "send_email"], [1, 0, 0, "-", "send_sms"], [1, 0, 0, "-", "sms_deleter"]], "gmailconnector.read_email": [[1, 1, 1, "", "ReadEmail"]], "gmailconnector.read_email.ReadEmail": [[1, 4, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "get_info"], [1, 3, 1, "", "instantiate"], [1, 3, 1, "", "read_mail"]], "gmailconnector.send_email": [[1, 1, 1, "", "SendEmail"]], "gmailconnector.send_email.SendEmail": [[1, 4, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "create_tls_connection"], [1, 3, 1, "", "multipart_message"], [1, 3, 1, "", "send_email"]], "gmailconnector.send_sms": [[1, 1, 1, "", "SendSMS"]], "gmailconnector.send_sms.SendSMS": [[1, 4, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "create_tls_connection"], [1, 3, 1, "", "generate_address"], [1, 3, 1, "", "send_sms"], [1, 3, 1, "", "validate_phone"]], "gmailconnector.sms_deleter": [[1, 1, 1, "", "DeleteSent"]], "gmailconnector.sms_deleter.DeleteSent": [[1, 3, 1, "", "delete_sent"], [1, 3, 1, "", "thread_executor"]], "gmailconnector.validator": [[1, 0, 0, "-", "address"], [1, 0, 0, "-", "domain"], [1, 0, 0, "-", "exceptions"], [1, 0, 0, "-", "validate_email"]], "gmailconnector.validator.address": [[1, 1, 1, "", "EmailAddress"]], "gmailconnector.validator.address.EmailAddress": [[1, 4, 1, "", "domain"], [1, 4, 1, "", "email"], [1, 4, 1, "", "user"]], "gmailconnector.validator.domain": [[1, 5, 1, "", "get_mx_records"]], "gmailconnector.validator.exceptions": [[1, 6, 1, "", "AddressFormatError"], [1, 6, 1, "", "InvalidDomain"], [1, 6, 1, "", "NotMailServer"], [1, 6, 1, "", "UnresponsiveMailServer"]], "gmailconnector.validator.validate_email": [[1, 5, 1, "", "validate_email"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:property", "5": "py:function", "6": "py:exception"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "property", "Python property"], "5": ["py", "function", "Python function"], "6": ["py", "exception", "Python exception"]}, "titleterms": {"gmail": [0, 1], "connector": [0, 1], "instal": 0, "env": 0, "var": 0, "send": [0, 1], "sm": [0, 1], "addit": 0, "arg": 0, "email": [0, 1], "read": [0, 1], "lint": 0, "chang": 0, "log": 0, "pypi": 0, "modul": 0, "runbook": 0, "repositori": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "me": 1, "delet": 1, "sent": 1, "valid": 1, "address": 1, "domain": 1, "custom": 1, "except": 1, "model": 1, "config": 1, "option": 1, "respond": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}})
\ No newline at end of file
diff --git a/gmailconnector/__init__.py b/gmailconnector/__init__.py
index 8cb90ca..a5f22ca 100644
--- a/gmailconnector/__init__.py
+++ b/gmailconnector/__init__.py
@@ -5,14 +5,14 @@
import dotenv
-from .models import Encryption, SMSGateway # noqa: F401
-from .options import Category, Condition, Folder # noqa: F401
+from .models.config import Encryption, SMSGateway # noqa: F401
+from .models.options import Category, Condition, Folder # noqa: F401
from .read_email import ReadEmail # noqa: F401
from .send_email import SendEmail # noqa: F401
from .send_sms import SendSMS # noqa: F401
from .validator import validate_email # noqa: F401
-version = "0.7.3"
+version = "0.7.4"
def load_env(filename: Union[str, os.PathLike] = ".env") -> NoReturn:
diff --git a/gmailconnector/requirements.txt b/gmailconnector/lib/requirements.txt
similarity index 100%
rename from gmailconnector/requirements.txt
rename to gmailconnector/lib/requirements.txt
diff --git a/gmailconnector/models.py b/gmailconnector/models/config.py
similarity index 100%
rename from gmailconnector/models.py
rename to gmailconnector/models/config.py
diff --git a/gmailconnector/options.py b/gmailconnector/models/options.py
similarity index 91%
rename from gmailconnector/options.py
rename to gmailconnector/models/options.py
index f559b6c..1104bed 100644
--- a/gmailconnector/options.py
+++ b/gmailconnector/models/options.py
@@ -1,6 +1,6 @@
"""Options that can be included while reading emails."""
-from datetime import date
+import datetime
from typing import Union
@@ -18,9 +18,9 @@ def text(text: str):
return 'TEXT "%s"' % text
@staticmethod
- def since(since: Union[str, float, 'date']):
+ def since(since: Union[str, float, 'datetime.date']):
"""Condition to retrieve emails since a given date."""
- if isinstance(since, date):
+ if isinstance(since, datetime.date):
return 'SINCE "%s"' % since.strftime('%d-%b-%Y')
return 'SINCE "%s"' % since
diff --git a/gmailconnector/responder.py b/gmailconnector/models/responder.py
similarity index 98%
rename from gmailconnector/responder.py
rename to gmailconnector/models/responder.py
index e226ecf..0770723 100644
--- a/gmailconnector/responder.py
+++ b/gmailconnector/models/responder.py
@@ -62,7 +62,7 @@ def count(self) -> int:
Returns:
int:
- Returns the number of unread emails.
+ Returns the number of emails.
"""
return self.raw.get('count')
diff --git a/gmailconnector/read_email.py b/gmailconnector/read_email.py
index 3fc9ff0..43e1d00 100644
--- a/gmailconnector/read_email.py
+++ b/gmailconnector/read_email.py
@@ -8,12 +8,12 @@
import pytz
-from .options import Category, Condition, Folder
-from .responder import Email, Response
+from .models.options import Category, Condition, Folder
+from .models.responder import Email, Response
class ReadEmail:
- """Initiates Emailer object to authenticate and yield the unread emails.
+ """Initiates Emailer object to authenticate and yield the emails according the conditions/filters.
>>> ReadEmail
@@ -28,7 +28,7 @@ def __init__(self, gmail_user: str = None, gmail_pass: str = None, folder: Folde
Args:
gmail_user: Gmail username to authenticate IMAP lib.
gmail_pass: Gmail password to authenticate IMAP lib.
- folder: Folder where the unread emails have to be read from.
+ folder: Folder where the emails have to be read from.
References:
https://imapclient.readthedocs.io/en/2.1.0/_modules/imapclient/imapclient.html#IMAPClient.xlist_folders
@@ -179,7 +179,7 @@ def get_info(self, response_part: tuple, dt_flag: bool) -> Email:
date_time=receive, body=body))
def read_mail(self, messages: list or str, humanize_datetime: bool = False) -> Generator[Email]:
- """Prints unread emails one by one after getting user confirmation.
+ """Yield emails matching the filters' criteria.
Args:
messages: Takes the encoded message list as an argument. This is the body of the ``instantiate`` method.
diff --git a/gmailconnector/send_email.py b/gmailconnector/send_email.py
index 8eaf654..9222e0f 100644
--- a/gmailconnector/send_email.py
+++ b/gmailconnector/send_email.py
@@ -6,8 +6,8 @@
import socket
from typing import Dict, NoReturn, Union
-from .models import Encryption
-from .responder import Response
+from .models.config import Encryption
+from .models.responder import Response
class SendEmail:
diff --git a/gmailconnector/send_sms.py b/gmailconnector/send_sms.py
index 5fd540b..80faedf 100644
--- a/gmailconnector/send_sms.py
+++ b/gmailconnector/send_sms.py
@@ -3,8 +3,8 @@
import socket
from typing import NoReturn, Union
-from .models import Encryption, SMSGateway
-from .responder import Response
+from .models.config import Encryption, SMSGateway
+from .models.responder import Response
from .sms_deleter import DeleteSent
diff --git a/gmailconnector/validator/validate_email.py b/gmailconnector/validator/validate_email.py
index 213d7f3..130e42c 100644
--- a/gmailconnector/validator/validate_email.py
+++ b/gmailconnector/validator/validate_email.py
@@ -4,7 +4,7 @@
import socket
from typing import Union
-from ..responder import Response
+from ..models.responder import Response
from .address import EmailAddress
from .domain import get_mx_records
from .exceptions import (AddressFormatError, InvalidDomain, NotMailServer,
diff --git a/pyproject.toml b/pyproject.toml
index 28213ff..260347c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,7 @@
[project]
name = "gmail-connector"
dynamic = ["version", "dependencies"]
-description = "Python module to, send SMS, emails and read unread emails"
+description = "Python module to, send SMS, emails and read emails"
readme = "README.md"
authors = [{ name = "Vignesh Sivanandha Rao", email = "svignesh1793@gmail.com" }]
license = { file = "LICENSE" }
@@ -26,7 +26,7 @@ packages = ["gmailconnector"]
[tool.setuptools.dynamic]
version = {attr = "gmailconnector.version"}
-dependencies = {file = ["gmailconnector/requirements.txt"]}
+dependencies = {file = ["gmailconnector/lib/requirements.txt"]}
[build-system]
requires = ["setuptools", "wheel"]
diff --git a/release_notes.rst b/release_notes.rst
index b896892..b332cd9 100644
--- a/release_notes.rst
+++ b/release_notes.rst
@@ -1,6 +1,11 @@
Release Notes
=============
+0.7.4 (04/02/2023)
+------------------
+- Reformat and move objects to models dir
+- Update docs
+
0.7.3 (04/02/2023)
------------------
- Bug fix on context to TLS and SSL
|