-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sepehr-akbarzadeh/develop
Develop
- Loading branch information
Showing
11 changed files
with
891 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the OS, Python version and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.12" | ||
# You can also specify other tool versions: | ||
# nodejs: "19" | ||
# rust: "1.64" | ||
# golang: "1.19" | ||
|
||
# Build documentation in the "docs/" directory with Sphinx | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
# formats: | ||
# - epub | ||
|
||
# Optional but recommended, declare the Python requirements required | ||
# to build your documentation | ||
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html | ||
python: | ||
install: | ||
- requirements: requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
import os | ||
import sys | ||
import sphinx_rtd_theme | ||
|
||
sys.path.insert(0, os.path.abspath('../../')) | ||
|
||
project = 'django-sage-mailbox' | ||
copyright = '2024, sageteam.org [email protected]' | ||
author = 'Sepehr Akbarzadeh [email protected]' | ||
release = '0.1.0' | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.napoleon", | ||
"sphinx.ext.viewcode", | ||
"sphinx_rtd_theme", | ||
] | ||
|
||
templates_path = ["_templates"] | ||
exclude_patterns = [] | ||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = "sphinx_rtd_theme" | ||
html_static_path = ["_static"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. _getting_started_index: | ||
|
||
Getting Started | ||
=============== | ||
|
||
You can learn the package step by step in below content table. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Content Table | ||
|
||
introduction | ||
installation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
Installation | ||
============ | ||
|
||
Installing `django-sage-mailbox` is like below: | ||
|
||
Using `pip` with `virtualenv` | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
1. **Create a Virtual Environment**: | ||
|
||
.. code-block:: bash | ||
python -m venv .venv | ||
2. **Activate the Virtual Environment**: | ||
|
||
- On Windows: | ||
|
||
.. code-block:: bash | ||
.venv\Scripts\activate | ||
- On macOS/Linux: | ||
|
||
.. code-block:: bash | ||
source .venv/bin/activate | ||
3. **Install `django-sage-mailbox`**: | ||
|
||
.. code-block:: bash | ||
pip install django-sage-mailbox | ||
Using `poetry` | ||
~~~~~~~~~~~~~~ | ||
|
||
1. **Initialize Poetry** (if not already initialized): | ||
|
||
.. code-block:: bash | ||
poetry init | ||
2. **Install `django-sage-mailbox`**: | ||
|
||
.. code-block:: bash | ||
poetry add django-sage-mailbox | ||
Django Settings Configuration | ||
----------------------------- | ||
|
||
Installed Apps | ||
~~~~~~~~~~~~~~ | ||
|
||
To use `django-sage-mailbox`, add it to your `INSTALLED_APPS` in the Django settings: | ||
|
||
.. code-block:: python | ||
INSTALLED_APPS = [ | ||
"django.contrib.sites", | ||
... | ||
"sage_mailbox", | ||
"django_jsonform", | ||
... | ||
] | ||
Additional Configuration for IMAP and Email | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Configure your IMAP and email settings in `settings.py`: | ||
|
||
.. code-block:: python | ||
SITE_ID = 1 | ||
# IMAP Server Configuration | ||
IMAP_SERVER_DOMAIN = "your.imap.server" | ||
IMAP_SERVER_PORT = 993 | ||
IMAP_SERVER_USER = "[email protected]" | ||
IMAP_SERVER_PASSWORD = "your-password" | ||
# Email Backend Configuration | ||
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" | ||
EMAIL_HOST = "your.smtp.server" | ||
EMAIL_PORT = 465 | ||
# EMAIL_USE_TLS = True | ||
EMAIL_USE_SSL = True | ||
EMAIL_HOST_USER = "[email protected]" | ||
EMAIL_HOST_PASSWORD = "your-password" | ||
# Default Email Settings | ||
DEFAULT_FROM_EMAIL = "[email protected]" | ||
SERVER_EMAIL = "[email protected]" | ||
# Custom Email Headers | ||
DEFAULT_EMAIL_HEADERS = { | ||
"X-Mailer": "sage_imap", | ||
"List-Unsubscribe": "<mailto:[email protected]>", | ||
"Return-Path": "<[email protected]>", | ||
"Reply-To": "[email protected]", | ||
"X-Priority": "3", | ||
"X-Report-Abuse-To": "[email protected]", | ||
"X-Spamd-Result": "default", | ||
"X-Auto-Response-Suppress": "All", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Introduction | ||
=================== | ||
|
||
Overview | ||
-------- | ||
|
||
`django-sage-mailbox` is a powerful Django package that transforms your Django application into a full-featured mailbox client. Built on the robust `python-sage-imap` foundation, this package aims to replicate the comprehensive functionality of widely-used mail clients like Outlook, SOGo, and RoundCube within your Django environment. | ||
|
||
What is `django-sage-mailbox`? | ||
------------------------------ | ||
|
||
`django-sage-mailbox` allows you to access and manage your emails directly from your Django application. It integrates seamlessly, providing features similar to popular email clients: | ||
|
||
- **Outlook:** Known for its user-friendly interface, calendar integration, and robust email management features. | ||
|
||
- **SOGo:** An open-source groupware server providing shared calendars and address books alongside email. | ||
|
||
- **RoundCube:** A web-based IMAP email client with a desktop-like user interface, supporting various email functionalities. | ||
|
||
Key Features | ||
------------ | ||
|
||
- **Comprehensive Mailbox Client:** Provides full email client capabilities within your Django application, similar to Outlook, SOGo, and RoundCube. | ||
|
||
- **Synchronization:** Ensures that your emails are always up-to-date, syncing seamlessly with your mail server. | ||
|
||
- **Easy Integration:** Offers an API that connects effortlessly to your user interface, enabling you to create a customized GUI for your mailbox. | ||
|
||
- **Admin Convenience:** Adheres to best practices, offering an intuitive and hassle-free admin experience. | ||
|
||
- **Standard Email Sending:** Sends standard-compliant emails using proper headers and the SMTP protocol. | ||
|
||
Why Choose `django-sage-mailbox`? | ||
--------------------------------- | ||
|
||
By integrating `django-sage-mailbox` into your Django application, you gain: | ||
|
||
- **Ease of Use:** The package is designed for straightforward setup and easy management. | ||
|
||
- **Reliability:** Built on the dependable `python-sage-imap` foundation, ensuring robust performance. | ||
|
||
- **Flexibility:** Allows customization of your email client UI to meet specific needs and preferences. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. Django Sage Email documentation master file, created by | ||
sphinx-quickstart on Mon Jan 01 00:00:00 2023. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to Django Sage Mailbox's documentation! | ||
=============================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
getting_started/index |
Oops, something went wrong.