Skip to content

Commit

Permalink
Documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Trafire committed Jun 5, 2022
1 parent 877a8e4 commit cb7f690
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
25 changes: 16 additions & 9 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Promailer
license
reference

**Promail** is a library for handling emails directly in python. With Promail you can:
**Promail** is a library for extending the functionality of your email box with your own python code.

------------------

Expand All @@ -18,9 +18,21 @@ Promailer
- filter emails in your inbox and run your own python functions based on them


**Simple example** ::
>> import
>>> client =
**Simple example**

Promail's :py:class:`promail.clients.GmailClient` uses Oauth rather than a password to access your email.
You'll be taken to googles Oauth login page which will allow you to log in.

.. code-block:: python
>>> from promail.clients import GmailClient
>>> client = GmailClient("[email protected]")
>>> my_email.send_email(
recipients="[email protected]",
cc="[email protected]",
subject="My First Promail Email",
htmltext="<h1>Hello World<h1>"
)
Installation
------------
Expand All @@ -31,9 +43,4 @@ Promailer can be pip installed:
$ pip install promailer
.. code-block:: python
client = GmailClient("[email protected]")
# The first time you do this it will open a web browser allowing you to sign into your google account directly
client.send_email()
1 change: 0 additions & 1 deletion src/promail/clients/gmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def send_email(
.send(userId="me", body={"raw": raw})
.execute()
)
print("Message Id: %s" % message["id"])
return message
except HttpError as error:
print("An error occurred: %s" % error)
Expand Down
1 change: 0 additions & 1 deletion src/promail/core/messages/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def attachments(self):
if self._attachments is None:
self._attachments = {}
for email_message_attachment in self.msg.iter_attachments():
print(type(email_message_attachment))
if email_message_attachment.is_attachment():
self._attachments[
email_message_attachment.get_filename()
Expand Down
1 change: 0 additions & 1 deletion src/promail/filters/email_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ def load_processed_ids(self):

def add_processed(self, email_id: str) -> None:
"""Add Message to list of processed Messages."""
print(email_id)
self.processed.add(email_id)
if not os.path.exists(self.save_folder):
os.makedirs(self.save_folder)
Expand Down

0 comments on commit cb7f690

Please sign in to comment.