Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilyashirko/mailganer
Service for mass mail distribution using gmail
https://github.com/ilyashirko/mailganer
celery django gmail python2
Last synced: 3 days ago
JSON representation
Service for mass mail distribution using gmail
- Host: GitHub
- URL: https://github.com/ilyashirko/mailganer
- Owner: ilyashirko
- Created: 2022-11-24T17:08:07.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-25T18:46:42.000Z (about 2 years ago)
- Last Synced: 2024-12-31T16:14:17.784Z (23 days ago)
- Topics: celery, django, gmail, python2
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# E-mail service
E-mail service for mass sending emails using `gmail` host.
You need `python 2.7`, `poetry 1.1.15` and `virtualenv 20.15.1` to work with service.
## Installation
clone repo, enter root dir:
```sh
git clone https://github.com/ilyashirko/mailganer && cd mailganer
```
Create virtual environment, activate and install dependencies:
```sh
virtualenv --python=python2.7 mailganer_env &&
source mailganer_env/bin/activate &&
poetry install
```
now its time to create `.env` file, you can edit `.env.example` and then rename it with `.env`.
You need:
- `DJANGO_SECRET_KEY` - you can generate it [here](https://djecrety.ir/)
- `EMAIL_HOST_USER` (required) - your [business account](https://www.gmail.com)
- `EMAIL_HOST_PASSWORD`(required) - [password for application](https://support.google.com/accounts/answer/185833?hl=ru)- `DEBUG` (optional) - 1 if you need debug mode (default - `False`)
- `ALLOWED_HOSTS` (optional) - your hosts (default - `127.0.0.1`)
- `EMAIL_HOST` (optional) - host of your email service (default - `smtp.gmail.com`)
- `EMAIL_PORT` (optional) - port (default - `465` for ssl connection)
- `EMAIL_USE_SSL` (optional) - `0` if you want to use TSL (default - `1`)
- `EMAIL_USE_TSL` (optional) - `1` if you want to use SSL (default - `0`)
After creating `.env` you can finish setup of django application and create superuser:
```sh
python manage.py migrate && python manage.py createsuperuser
```
## Usage
For using app you should launch django app, celery worker and redis-server:
```sh
redis-server && python manage.py runserver | python -m celery -A mailganer worker -l info
```
now you can enter django admin `{your_host}/admin` using superuser login and password.
To make your first distribution you should:
- create Subscriber objects - people who will take your letters.
- create template in html format. You can use `firstname`, `lastname`, `birthday` and `email` of your subscribers. This data will add automaticaly (example below).
- create message object.
- select message and choose `send message` option.
### Template example
```
Вас зовут: {{ firstname }} {{ lastname }}.
Ваш день рождения: {{ birthday }}.
Ваша почта: {{ email }}
```
`` - pixel for open letter report