Saravanan666/pypi-org huggingface dataset:
Package: django-mailgun-mime
It is a tiny wrapper for Django that allows to send mail via Mailgun`s API.
For the reference of Mailgun`s API, please visitapi for sending.For the Django`s email implementation, please visitsending email.This wrapper sends request to Mailgun`s mime API
to efficiently use Django`s EmailMessage instance.
In this case we just put mime message,
prepared by Django`s EmailMessage instance,
and attach it as a file.
After receiving your message Mailgun`s API will do the rest of job.This wrapper also supports Mailgun`s extra headers,
which can be very useful.
After wrapper finds such header it places one to request’s data.
Please notice that wrapper does not validate Mailgun’s extra headers.
If does so it won’t be simple and tiny anymore. :-)RequirementsDjango 1.7+requests for PythonInstallation$pipinstalldjango-mailgun-mimeQuick startCreate an account atMailgun;Set up correctly Mailgun`s records at your DNS provider. (Just follow the Mailgun instructions);Wait until Mailgun will check and approve your settings;If you fail go back to point 2;Set up following variables at yours project settings:EMAIL_BACKEND='django_mailgun_mime.backends.MailgunMIMEBackend'MAILGUN_API_KEY='your api key'MAILGUN_DOMAIN_NAME='your.domain'# optionally:DEFAULT_FROM_EMAIL='postmaster@your.domain'SERVER_EMAIL='admin@your.domain'Now you can send email via Mailgun API. Also you can send email through Mailgun SMTP service. In this case just use Django`s SMTP backend.ExamplesFirstly, we need to import some dependencies:fromdjango.template.loaderimportrender_to_stringfromdjango.confimportsettingsfromdjango.core.mailimportsend_mail,EmailMultiAlternativesfromdjango.core.mailimportget_connectionA simple email sending# We will use these paths aheadpath_to_txt='path/to/template.txt'path_to_html='path/to/template.html's='Simple test for Mailgun awesomeness'm='Congratulations! Now you know Mailgun awesomeness!'context={'title':s,'message':m}txt=render_to_string(path_to_txt,context)html=render_to_string(path_to_html,context)send_mail(s,txt,settings.DEFAULT_FROM_EMAIL,['to@example.com'],html_message=html)Mailgun extra headers and file attachments='Testing Mailgun awesomeness!'m='Message content for email with tracking.'context={'title':s,'message':m}txt=render_to_string(path_to_txt,context)html=render_to_string(path_to_html,context)msg=EmailMultiAlternatives(s,txt,settings.DEFAULT_FROM_EMAIL,['to@example.com'])msg.attach_alternative(html,'text/html')msg.attach_file('path/to/file')msg.extra_headers['o:tracking-opens']='yes'msg.extra_headers['h:Reply-To']='from@example.com'msg.send()Specifying connectionapi_key='API_KEY_FROM_MAILGUN'domain='yours.domain.name.checked.and.set.at.mailgun'connection=get_connection('django_mailgun_mime.backends.MailgunMIMEBackend',api_key=api_key,domain=domain)s='Testing specific connection!'m='Well... You receive it. What now?'context={'title':s,'message':m}txt=render_to_string(path_to_txt,context)html=render_to_string(path_to_html,context)send_mail(s,txt,settings.DEFAULT_FROM_EMAIL,['to@example.com'],connection=connection,html_message=html)License
Package: django-mailgun-provider
==========Django-Mailgun==========:Info: A Django email backend for use with Mailgun:Author: Bradley Whittington (http://github.com/bradwhittington, http://twitter.com/darb)This README is derived from https://github.com/hmarr/django-ses/blob/master/README.rstOverview=================Django-Mailgun is a drop-in mail backend for Django_,per http://docs.djangoproject.com/en/dev/topics/email/#e-mail-backendsGetting going=============Install django-mailgun::pip install django-mailgunAdd the following to your settings.py::EMAIL_BACKEND = 'django_mailgun.MailgunBackend'MAILGUN_ACCESS_KEY = 'ACCESS-KEY'MAILGUN_SERVER_NAME = 'SERVER-NAME'Now, when you use ``django.core.mail.send_mail``, Mailgun will send the messages.. _Builtin Email Error Reporting: http://docs.djangoproject.com/en/1.2/howto/error-reporting/.. _Django: http://djangoproject.com.. _Mailgun: http://mailgun.net
Package: django-mailgun-redux
==========Django-Mailgun==========:Info: A Django email backend for use with Mailgun:Author: Bradley Whittington (http://github.com/bradwhittington, http://twitter.com/darb):Release Manager: Daniel Roy GreenfeldThis README is derived from https://github.com/hmarr/django-ses/blob/master/README.rstOverview=================Django-Mailgun is a drop-in mail backend for Django_,per http://docs.djangoproject.com/en/dev/topics/email/#e-mail-backendsGetting going=============Install django-mailgun::pip install django-mailgunAdd the following to your settings.py::EMAIL_BACKEND = 'django_mailgun.MailgunBackend'MAILGUN_ACCESS_KEY = 'ACCESS-KEY'MAILGUN_SERVER_NAME = 'SERVER-NAME'Now, when you use ``django.core.mail.send_mail``, Mailgun will send the messages.. _Builtin Email Error Reporting: http://docs.djangoproject.com/en/1.2/howto/error-reporting/.. _Django: http://djangoproject.com.. _Mailgun: http://mailgun.net
Package: django-mailgun-validation
This is a Django app that provides fields (for models and forms) that use
Mailgun’s validation API for validating email address.The documentation on Mailgun’s validation API is here:http://documentation.mailgun.com/api-email-validation.htmlSee this blog post for more info on why it is a good idea to use this service
and not just rely on Django’s built-in email validation:http://blog.mailgun.com/post/free-email-validation-api-for-web-forms/Usage:` pip installdjango-mailgun-validation`Alternatively:` pip installgit+git://github.com/gnrfan/django-mailgun-validation.git`Using the validator:`python from mailgun_validation.validators import validate_email status =validate_email('john.smith@gmail.com')`If the result is`None`the email address is OK but if an exception is
raised, the validation did not succeded.Both model and form fields can use Mailgun’s validation API or fall back to
using Django’s built-in email validation:`python >>> from mailgun_validation.db.models.fields import EmailField >>> f = EmailField() >>> f.default_validators [<mailgun_validation.validators.EmailValidator object at 0x10bed3d90>] >>> f = EmailField(use_mailgun=False) >>> f.default_validators [<django.core.validators.EmailValidator object at 0x10bb3a790>] `The same for the forms field:`python >>> from mailgun_validation.forms.fields import EmailField >>> f = EmailField() >>> f.default_validators [<mailgun_validation.validators.EmailValidator object at 0x10bed3d90>] >>> f = EmailField(use_mailgun=False) >>> f.default_validators [<django.core.validators.EmailValidator object at 0x10bb3a790>] `In your Django project settings make sure to add your Mailgun API key:`python MAILGUN_API_KEY = '<your Mailgun API key goes here>' `In order for this code to work please install the Mailgun API Python wrapper
from this Github repo:You can do just that by running this command:` pip installgit+git://github.com/gnrfan/mailgun-python-api.git`2013 - Antonio Ognio <antonio@ognio.com>
Package: django-mailjet
==============Django-Mailjet==============Un-official Django email backend for use with Mailjet - https://www.mailjet.com/Overview========Django-Mailjet is a drop-in mail backend for Django.Getting going=============Install django-mailjet:``pip install django-mailjet``Add the following to your ``settings.py``::EMAIL_BACKEND = 'django_mailjet.backends.MailjetBackend'MAILJET_API_KEY = 'API-KEY'MAILJET_API_SECRET = 'API-SECRET'Replace ``API-KEY`` and ``API-SECRET`` with the values from your Mailjet account details.Now, when you use ``django.core.mail.send_mail``, Mailjet will send the messages... _Mailjet: http://mailjet.com*NOTE*: Django-Mailjet does **NOT**validate your data for compliance with Mailjet's API.You must ensure what you send is appropriate.Django Email Backend Reference================================* https://docs.djangoproject.com/en/dev/topics/email/#email-backends
Package: django-mailman
django-mailman is a simple way to manage one or more mailman mailing lists which are not installed on your server.
It uses the webinterface to subscribe or unsubscribe a mailinglist member.
Additional you are able to request a list of all subscribed members for a specific mailing list.Requirementsdjango-mailmanis tested and works with mailman version 2.1.5.
It’s possible that mailman also works with the 2.1.x series, but I guess it wouldn’t work with the 3.x series which is under development at the momentdjango-mailmanrequires Django 1.4 or later.ConfigurationFirst of all, you must add this project to your list ofINSTALLED_APPSinsettings.py:INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    ...
    'django_mailman',
    ...

)Runmanage.py syncdb.  This creates the appropriate tables in your database that are necessary for operation.Usagefrom django_mailman.models import ListCreate new ListCode:list_name = 'testlist'
list_pwd = 'pwd'
list_email = 'testlist@mydomain.com'
list_url = 'http://mailman.listdomain.com'
list_encoding = 'iso-8859-1' # must match the encoding of your mailman installation

list = List(name=list_name, password=list_pwd, email=list_email,
    main_url=list_url, encoding=list_encoding)Subscribe new memberlist.subscribe(‘membername@maildomain.com’, ‘first-name’, ‘last-name’)Unsubscribe memberlist.unsubscribe(‘membername@maildomain.com’)Show a list of all subscribed memberslist.get_all_members()This method will return a list of all members in the following format:
[[u’first-name last-name’,u’membername@maildomain.com’]]Admin Moderation UrlIf you would like to provide some functionality to log into your mailman moderation area you could request the complete url from your list.list.get_admin_moderation_url()
Package: django-mailman3
This package contains libraries and templates for Django-based interfaces
interacting with Mailman.To use this application, adddjango_mailman3to theINSTALLED_APPSlist
in your Django server’s settings file.NEWS1.3.11 (2023-10-22)Added a migration to clear the django_sessions table to avoid Mailman Web
#16.  This will remove user’s login data and require them to log in again.
(See !195)1.3.10 (2023-10-21)ConfigurationBREAKING CHANGE:django_mailman3now requires django_allauth>=0.56.
This requires the addition ofallauth.account.middleware.AccountMiddlewaretoMIDDLEWAREin your Django settings.  If your installation uses settings
frommailman-webashere,
upgrading mailman-web to 0.0.7 will do this.Other ChangesAdd support for Django 4.2Migrate to Bootstrap 5. (See !188)A11y: Group related radio buttons and Multi-CheckboxInput. (Fixes #65)Add social account buttons to the Sign Up page. (Fixes #67)Remove real name requirement from user profile (Fixes #51)1.3.9 (2022-01-04)Add support for Python 3.11.1.3.8 (2022-10-22)Add support for Django 4.0 and 4.1 (Fixes #55)Add support for Python 3.10 (See !153)Fix the Fedora socialaccount provider. (Fixes #50)Add pagination only when there are more than one pages. (Fixes #58)Use Pytest as the test runner.1.3.7 (2021-09-02)Set the minimum required version ofmailmanclientin setup.py.
(Fixes #46)1.3.6 (2021-08-31)django_mailman3.lib.mailman.get_mailman_client()now supports
Mailmanclient request hooks to be added using a new@mailmanclient_request_hookdecorator.Scrubber now removes null bytes from the scrubbed message body.Update the Display Name of a user and it’s associated addresses in Mailman
when the display name is updated in Django.Sync a Django user’s email address to Core even if it is not verified.Add an allauth account adapter to disable signups.Add support for Django 3.2.1.3.5 (2021-01-15)Add a new method get_django_user to return Django User model. (See !99)Adddelete_archivesfield tomailinglist_deletedSignal.Replaced deprecatedugettexy_lazywithgettext_lazy. (Closes #37)1.3.4 (2020-06-05)Fix a bug caused by bumping to Mailman API 3.1 in version 1.3.3 which
resulted in 404 errors for some users. (Closes #35)1.3.3 (2020-06-01)Hide “Account Connections” tab in accounts if no social account providers are
installed. (See !54)Use bold font for form labels (See !82)Update a user’s preferred_address in Mailman Core when a user updates their
primary address in Profile. (Closes #32)Use Mailman’s API version 3.1 to get Hex UUIDs instead of integer.Caught a LookupError when scrubbing an attachment with an unknown charset.
(Closes #12)Properly scrub the content of message/rfc822 parts.  (Closes #34)LicenseDjango-mailman is licensed under theGPL v3.0Copyright (C) 2017-2020 by the Free Software Foundation, Inc.
Package: django-mailman-eso
django-mailman is a simple way to manage one or more mailman mailing lists which are not installed on your server.
It uses the webinterface to subscribe or unsubscribe a mailinglist member.
Additional you are able to request a list of all subscribed members for a specific mailing list.Requirementsdjango-mailmanis tested and works with mailman version 2.1.5.
It’s possible that mailman also works with the 2.1.x series, but I guess it wouldn’t work with the 3.x series which is under development at the momentdjango-mailmanrequires Django 1.4 or later.ConfigurationFirst of all, you must add this project to your list ofINSTALLED_APPSinsettings.py:INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    ...
    'django_mailman',
    ...

)Runmanage.py syncdb.  This creates the appropriate tables in your database that are necessary for operation.Usagefrom django_mailman.models import ListCreate new ListCode:list_name = 'testlist'
list_pwd = 'pwd'
list_email = 'testlist@mydomain.com'
list_url = 'http://mailman.listdomain.com'
list_encoding = 'iso-8859-1' # must match the encoding of your mailman installation

list = List(name=list_name, password=list_pwd, email=list_email,
    main_url=list_url, encoding=list_encoding)Subscribe new memberlist.subscribe(‘membername@maildomain.com’, ‘first-name’, ‘last-name’)Unsubscribe memberlist.unsubscribe(‘membername@maildomain.com’)Show a list of all subscribed memberslist.get_all_members()This method will return a list of all members in the following format:
[[u’first-name last-name’,u’membername@maildomain.com’]]Admin Moderation UrlIf you would like to provide some functionality to log into your mailman moderation area you could request the complete url from your list.list.get_admin_moderation_url()
Package: django-mailmangler
A simple Django app providing template tags that attempt to obfuscate raw
e-mail addresses to make them ever so slightly more difficult to scrape.To be less-obtrusive, JavaScript is used to translate mangled source into a
normal e-mail address. If JavaScript is not present, the reCAPTCHA mailhide
service is offered to deobfuscate the addresses.Using images, LTR-RTL hacks, or forcing reCAPTCHA access might be better at
keeping your address safe from bots, but it’s annoying for legitimate users.
By using JavaScript, hopefully we can thwart some of the dumbest bots into
farming someone else’s email address without much of a usability hit.Quick startIn your Django’s settings:Add'mailmangler'to yourINSTALLED_APPS.AddMAILMANGLE_PUBLICandMAILMANGLE_SECRET,
with keys from the reCAPTCHA Mailhide API:
<http://www.google.com/recaptcha/mailhide/apikey>, e.g.MAILMANGLE_PUBLIC = 'your-key...=='
MAILMANGLE_SECRET = '123789...abcd'Load the tag library with{% load mailmangler %}In the<head>of your template, add{% mailmangle_js %}Pipe (filter) email addresses throughmailmangleormailmangle_linked, e.g.{{ my_email_var|mailmangle }}
{{ "alice@example.com"|mailmangle }}
{{ "bob@example.net"|mailmangle_linked }}will produce:A JS obfuscated, unlinked string of whatevermy_email_varwas.A JS obfuscated, unlinked string of “alice@example.com”A JS obfuscated, string with mailto link of “bob@example.com”If JS is not present, a reCAPTCHA mailhide link is available in<noscript>tags.
Package: django-mailmate
Mailmate is a Django app comprised of tools to make dealing with emails easier.
Its main feature is a simple, class-based way to define email messages using
Django templates. Here’s a quick sales pitch:frommailmateimportTemplatedEmailMessageclassMyEmail(TemplatedEmailMessage):to=['some-user@some-email.com']from_email='no-reply@some-email.com'subject='Hello, {{ name }}!'template_name='emails/template.txt'MyEmail(extra_context={'name':'Jerry'}).send()Installationpip installdjango-mailmateTemplatedEmailMessageExtendTemplatedEmailMessage, and set class attributes. You can override
any of those attributes by passing keyword arguments to the constructor.frommailmateimportTemplatedEmailMessageclassMyEmail(TemplatedEmailMessage):to=['some-user@some-email.com']from_email='no-reply@some-email.com'subject='Hello!'template='emails/template.txt'MyEmail(to=['somebodyelse@somewhereelse.com']).send()You can use a template to define your email body (like in the above example), or
define it as a string:frommailmateimportTemplatedEmailMessageclassMyEmail(TemplatedEmailMessage):to=['some-user@some-email.com']subject="The subject is parsed as a {{ what }}"body="The body's also parsed as a {{ what }}."MyEmail(extra_context={'what':'Django template!'}).send()TemplatedEmailMessagealso makes it simple to create HTML emails. Simply add
anhtml_template_nameattribute to your class (or pass it to the
constructor):frommailmateimportTemplatedEmailMessageclassMyEmail(TemplatedEmailMessage):to=['some-user@some-email.com']subject="The subject is parsed as a {{ what }}"body="The body's also parsed as a {{ what }}."html_template_name='emails/my_email.html'TheTemplatedEmailMessageclass extendsdjango.core.mail.EmailMultiAlternatives, so you don’t have to do anything
special to use it with your favorite backend.If you installmarkdownify, you can omit the plaintext version of your
message; mailmate will generate one automatically from the HTML version.
Otherwise, omitting bothbodyandtemplate_namewill cause a MissingBody
exception to be raised. If you want to send an email without a plaintext body,
you must setbodyto an empty string explicitly.CleanEmailBackendMailmate also includes a special backend to help you debug your emails. It’s
like Django’sdjango.core.mail.backends.filebased.EmailBackend, but in
addition to the *.log file, it will also save files containing the message body
for each version of the message. For example, if you send an email that has both
a plaintext and HTML version, it will save a *.log file (with the entire
message), a *.txt file (with the plaintext body) and a *.html file (with the
body of the HTML alternative).To use it, set yourEMAIL_BACKENDandEMAIL_FILE_PATHsettings in
settings.py:EMAIL_BACKEND='mailmate.backends.CleanEmailBackend'EMAIL_FILE_PATH='/path/to/messages/'
Package: django-mailprotector
Django MailprotectorA reusable Django app that protects email addresses and phone numbers, in various ways. Django 1.8+, no further dependencies.InstallationTo get the latest stable release from PyPipip install django-mailprotectorAddmailprotectorto yourINSTALLED_APPSINSTALLED_APPS = (
    ...,
    'mailprotector',
)If you want to use themailprotector_textblocktag, you'll need to have beautifulsoup4 installed.UsageBefore your tags/filters are available in your templates, load them by using{% load mailprotector_tags %}Then either email address after email address:{% mailprotector 'your@domain.com' link_text='link text' css_class='stylish' %}Or as text block, for example from a rich text editor:{% mailprotector_textblock object.richtext css_class='stylish' %}SettingsMAILPROTECTOR_MODE = 'munger|munger_link_only'This settings defines the protection algorithm used. Each has benefits and drawbacks...munger: basic "munging" algo, replacing a mailto/tel link with a span, that gets filled with a new link.
drawbacks: mailto are in dom, after a page is fully rendered with js (for example, with phantomjs). the link
text can only be basic text, no html is possible. existing attributes (in textblock mode) will be removed (including class!) .munger_link_only: "munging", but only with the href.
benefits: all link attributes as well as link text including html is conserved
drawbacks: for safety, emails and phone numbers (not yet) are protected in a basic way: @ = ' (at) ', . = ' . 'email_pattern = r'\b[-.\w]+@[-.\w]+.[a-z]{2,6}\b'
phone_pattern = r'\d{3} \d{3} \d{2} \d{2}'MAILPROTECTOR_EMAIL_PATTERN = re.compile(r'(' + email_pattern + r')')
MAILPROTECTOR_PHONE_PATTERN = re.compile(r'(' + phone_pattern + r')')For the mailprotector_textblock tag, you can yourself define the used regexes. Following are the
defaults. If any of these areNone, it is omitted during protection.
WARNING: The default phone pattern is going to change to a more
international default!Developmentthere is test app, available with./manage.py runserver.to run tests: ./manage.py testto run tests with django 1.8 / 1.9 / 1.10:toxContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your fork
mkvirtualenv -p python2.7 django-mailprotector
pip install -r test_requirements.txt
git checkout -b feature_branch
# Implement your feature and tests
git add . && git commit
git push -u origin feature_branch
# Send us a pull request for your feature branchgeckodriver installvisithttps://github.com/mozilla/geckodriver/releasesdownload the latest version of "geckodriver-vX.XX.X-linux64.tar.gz"unarchive the tarball (tar -xvzf geckodriver-vX.XX.X-linux64.tar.gz)give executable permissions to geckodriver (chmod +x geckodriver)move the geckodriver binary to /usr/local/bin or any location on your system PATH.
Package: django-mailqueue-backend
InstallationYou must have setuptools installed.From PyPI:pip install django_mailqueue_backendOr download a package from thePyPIor theBitBucket
page:pip install <package>Or unpack the package and:python setup.py install.DependenciesDjango >=1.4,<1.5,>=1.6 and its dependencies.queue-front >= 0.7.2 located at:https://bitbucket.org/dwaiter/queue-front/orhttps://pypi.python.org/pypi/queue-front. Note that queue-front also has
dependencies. Seethis
pagefor more details.IntegrationIn your Django settings.py file insert the following in an appropriate
place:...

INSTALLED_APPS = [
    ...
    "mailqueue_backend",
    ...
]

...

EMAIL_BACKEND = "mailqueue_backend.mail.smtp.QueuedEmailBackend"
...That is it. You should run the following command by any regular means
that you prefer (cron, celery, etc):./manage.py process_mail_queueMail StorageMail is stored in a queue. The backend for the queue is specified by you
in the queue-front app.CompatibilityThis module has been tested with the following: (Note that python 3.0
compatibility is dependent on the backend queue you choose to use with
the queue-front dependency.)python 2.7 django 1.4python 2.7 django 1.6python 2.7 django 1.7python 3.2 django 1.6python 3.2 django 1.7python 3.3 django 1.6python 3.3 django 1.7python 3.4 django 1.6python 3.4 django 1.7AdvancedPackages SecurityThis module, when packaged, is signed with the following key:Mario Rosa’s Key with id 0x8EBBFA6F (full fingerprint F261 96E4 8EF2
ED4A 26F8 58E9 04AA 48D1 8EBB FA6F) and his email ismario@dwaiter.comYou can find this key on servers likepgp.mit.edu.Additional SettingsMAIL_QUEUE_NAMEDefault: “MAIL_QUEUE”Set the name of the queue.MAIL_QUEUE_LOG_FILENAMEDefault: “smtp.mail_queue.mail_queue_fail.log”A log to this file will be made when a message is discarded.MAIL_QUEUE_LOG_FILE_MAXBYTESDefault: 5242880 (Integer) aka 5MBMaximum size of a log file.MAIL_QUEUE_LOG_FILE_BACKUPDefault: 5 (Integer)Number (n) of files in log rotation. A new backup is created once
MAXBYTES is reached in the current log file up to n many log files. The
oldest log file is deleted on rotation (i.e. n+1).MAIL_QUEUE_EXPIREDefault: 86400 (Integer) aka 1 dayThe amount of time in seconds until a failed email is discarded from the
queue.