Saravanan666/pypi-org huggingface dataset:
Package: mailing-backend
Mailing backendПроект для интеграции МС рассылки с другими Django МС.ПодготовкаСкачать через pip:pip install mailing-backend==1.0.5settings.pyДобавить проект в INSTALLED_APPS# File: settings.pyINSTALLED_APPS=[..."mailing_backend",]Установить переменную EMAIL_ENDPOINT_URL# File: settings.pyEMAIL_ENDPOINT_URL="http://127.0.0.1:8000/api/v1/mailing/message-send/"Установить переменную EMAIL_BACKEND# File: settings.pyEMAIL_BACKEND="mailing_backend.backend.EndpointEmailBackend"Пример использования:serializers.py#serializers.pyfromrest_frameworkimportserializersclassSendUserMSSerializer(serializers.Serializer):subject=serializers.CharField()body=serializers.CharField()email_list=serializers.ListField(child=serializers.CharField(max_length=254))from_message=serializers.CharField(required=False,allow_blank=True)views.py#views.pyfromtypingimportAnyfromrest_framework.viewsimportAPIViewfromrest_framework.responseimportResponsefromrest_framework.requestimportRequestfromdjango.core.mailimportEmailMessagefromma_apps.serializersimportSendUserMSSerializerclassMessageSendMSView(APIView):serializer_class=SendUserMSSerializer#пример обращения к сериализаторуdefpost(self,request:Request,*args:Any,**kwargs:Any)->Response:message_serializer=SendUserMSSerializer(data=request.data)message=EmailMessage()message.subject=message_serializer.initial_data.get("subject",'')#stringmessage.body=message_serializer.initial_data.get("body",'')#stringmessage.to=message_serializer.initial_data.get("email_list",[])#listmessage.from_email=message_serializer.initial_data.get("from_message",'')#stringresult=message.send()returnResponse(result)urls.py#urls.pyfromappmsimportviewsfromdjango.urlsimportpathurlpatterns=[path("message-ms-send/",views.MessageSendMSView.as_view(),name="send"),]Пример запроса{"subject":"Тема сообщения","body":"Содержание сообщения","email_list":["example1@mail.ru","example2.@mail.ru"],"from_message":"Sender"}СборкаКак собрать проект локальноpython3-mpipinstallbuild
python3-mbuildПроверка собранного пакетаpython3-mpipinstalltwine
twinecheckdist/*Выкладывание проекта в PYPItwineuploaddist/*
Package: mailinglogger
This package contains two handlers for the python logging
framework that enable important log entries to be sent by email.This can either be as the entries are logged or as a summary at
the end of the running process.The handlers have the following features:customisable and dynamic subject lines for emails sentemails sent with configurable headers for easy filteringflood protection to ensure the number of emails sent is not
excessivesupport for SMTP servers that require authenticationconfigurable log entry filteringfully documented and tested
Package: mailing-logs
mailing_logseasy logs with packageHow to usefrommailing_logsimportMailingLogslog=MailingLogs(tg_token="YOUR_TG_TOKEN")forprofileinprofiles:message=send_foo(...)log.append(profile.chat_id,message.message_id)# chat_id, message_idlog.send_to_tg(YOUR_ACCOUNT_ID)# send a logs file to your telegram account
Package: mailjet
IntroductionMailjetis a real-time Cloud Emailing
platform and this is a python library to access theMailjet Web
API.InstallationClone this repository:git clonehttps://github.com/WoLpH/mailjetcdinto the cloned directory and execute:python setup.py install.The settings can be configured from a Django settings file throughMAILJET_API_KEYandMAILJET_SECRET_KEY, or through environment
variables with the same name.i.e.exportMAILJET_API_KEY='YOUR_API_KEY'exportMAILJET_SECRET_KEY='YOUR_SECRET_KEY'Alternatively, you can just pass the API key and Secret key as
parameters when initializing the mailjet API as follows:importmailjetmailjet_api=mailjet.Api(api_key='YOUR_API_KEY',secret_key='YOUR_SECRET_KEY')UsageTo get your account and profile information:importmailjetmailjet_api=mailjet.Api(api_key='YOUR_API_KEY',secret_key='YOUR_SECRET_KEY')account_info=mailjet_api.user.infos()acount_infowould now be assigned the following python dict:{'status':'OK','infos':{'username':'user@domain.com','firstname':'firstname','locale':'en_US','lastname':'lastname','company_name':'company_name','contact_phone':None,}}Create a new list of contacts, following on from the previous
example:contact_list=mailjet_api.lists.create(label='test',name='testlist',# Only alphanumeric characters are allowed!method='POST')contact_listwill now contain a dictionary with the status and list
id as below:{'status':'OK','contact_id':000000000}You can now add contacts to your list using thecontact_id:mailjet_api.lists.addcontact(contact='example@example.com',id=contact_list['list_id'],method='POST')FAQHow do I give reserved python keywords as parameters?Methods such as creating a campaign require you to use reserved python
keywords, such asfrom- hence, in order to overcome this, do the
following:params=dict()params['method']='POST'params['subject']='My first campaign'params['list_id']=contact_list['list_id']params['lang']='en'params['from']='noreply@example.com'params['from_name']='Your name'params['footer']='default'campaign=mailjet_api.message.createcampaign(**params)How do I debug errors?The errors produced by themailjetlibrary (or actually, produced by
theurllib2library) are still normal http responses. So if you wish
to read the actual response, do something like this:try:contact_list=mailjet_api.lists.create(label='test',name='Test list',# Incorrect because of the space in the namemethod='POST')exceptException,e:print'Mailjet response:%r,%r'%(e,e.read())
Package: maillib
maillibmaillib is a wrapper around Python’s email package to provide simple and
automatic decoding of messages to unicode and several other conveniences.Example>>> import maillib
>>> import datetime
>>>
>>> RAW_MESSAGE = """\
... MIME-version: 1.0
... Date: Sun, 25 Oct 2009 21:12:18 -0500
... Message-id: <c90890f0910251912y40797940ga9f22413411d59dc@mail.gmail.com>
... Subject: =?UTF-8?B?0JLQsNGI0YMg0LzRi9GB0LvRjA==?=
... From: Sender <sender@example.com>
... To: =?UTF-8?B?0JLQu9Cw0LTQuMyB0LzQuNGAINCc0LDRj9C60L7MgdCy0YHQutC40Lk=?=
...  <mayakovsky@example.com>
... Content-type: multipart/alternative; boundary=001636ed670f4e3ad20476cd176b
...
... --001636ed670f4e3ad20476cd176b
... Content-Type: text/plain; charset=UTF-8
... Content-Transfer-Encoding: base64
...
... KtGB0L/QsNGB0LjQsdC+Kgo=
... --001636ed670f4e3ad20476cd176b
... Content-Type: text/html; charset=UTF-8
... Content-Transfer-Encoding: quoted-printable
...
... <span class=3D"Apple-style-span" style=3D"font-family: arial, sans-serif; f=
... ont-size: 13px; border-collapse: collapse; "><b>=D1=81=D0=BF=D0=B0=D1=81=D0=
... =B8=D0=B1=D0=BE</b></span>
...
... --001636ed670f4e3ad20476cd176b--
... """
>>> msg = maillib.Message.from_string(RAW_MESSAGE)
>>> msg.subject
Вашу мысль>>> msg.sender
(u'Sender', u'sender@example.com')>>> msg.to
(u'Влади́мир Маяко́вский' u'mayakovsky@example.com')>>> msg.date
datetime.datetime(2009, 10, 26, 2, 12, 18)>>> msg.body
спасибо>>> msg.html
<span class=3D"Apple-style-span" style=3D"font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><b>спасибо</b></span>
Package: maillogger
mailloggerAnalysis tool for Postfix log in /var/log/maillogFeatureInstallationUsageExamplesOutput a CSV fileOutput a JSON fileOutput a TSV fileOutput a compressed CSV fileUse CaseAnalysis using MySQLFeatureLoad maillog fileIdentify text or gzip automaticallyParse maillogUse regexConvert to Python dictionaryOutput the parsed maillog to filesSupported data format is CSV, TSV and JSONCompression (gzip) is possibleInstallationpipinstallmailloggerUsageusage: maillogger [-h] [-f {csv,tsv,json}] [-c] [-V] source_file target_file

Analysis tool for Postfix log in /var/log/maillog

positional arguments:
  source_file           Specify Postfix maillog file
  target_file           Specify the filename to write parsed maillog. The file
                        extension is automatically added to the end of
                        filename.

optional arguments:
  -h, --help            show this help message and exit
  -f {csv,tsv,json}, --format {csv,tsv,json}
                        File data format to write the parsed maillog (Default:
                        csv)
  -c, --compress        Compress the output file with gzip
  -V, --version         Show maillogger command versionExamplesOutput a CSV filemaillogger/var/log/maillogresultormaillogger/var/log/maillogresult-fcsvThen,result.csvis generated in current working directory.Output a JSON filemaillogger/var/log/maillogresult-fjsonOutput a TSV filemaillogger/var/log/maillogresult-ftsvOutput a compressed CSV filemaillogger/var/log/maillogresult-fcsv-cThen,result.csv.gzis generated in current working directory.Use CaseAnalysis using MySQLConvert maillog text to CSV filemaillogger/var/log/maillog/path/to/any-fcsvCreate TableCREATETABLEmaillog(mail_idVARCHAR(15)NOTNULL,to_addressVARCHAR(50)NOTNULL,relaytext,delayVARCHAR(10),delaysVARCHAR(20),dsnVARCHAR(10),statusVARCHAR(10),descriptiontext,datetimeDATETIMENOTNULL,PRIMARYKEY(mail_id,datetime),INDEXi_status(status))ENGINE=InnoDBDEFAULTCHARSET=utf8;Load CSV fileLOADDATAINFILE'/path/to/any.csv'IGNOREINTOTABLEmaillogFIELDSTERMINATEDBY','OPTIONALLYENCLOSEDBY'"'LINESTERMINATEDBY'\r\n'IGNORE1LINES;
Package: mailman3-fedmsg-plugin
Publish notifications about mails to the fedmsg bus.Enable this by adding the following to your mailman.cfg file:[archiver.fedmsg]
# The class implementing the IArchiver interface.
class: mailman3_fedmsg_plugin.Archiver
enable: yesYou can exclude certain lists from fedmsg publication by
adding them to a ‘mailman.excluded_lists’ list in /etc/fedmsg.d/:config = {
    'mailman.excluded_lists': ['bugzilla', 'commits'],
}
Package: mailman-api
mailman-apiprovides a daemon that will listen to HTTP requests,
providing access to a REST API that can be used to interact with a
locally-installed Mailman instance.DocumentationDocumentation available at:http://mailman-api.readthedocs.org/Licensing informationCopyright (C) 2013-2014 Sergio OliveiraThis program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Package: mailmanclient
Themailmanclientlibrary provides official Python bindings for the GNU
Mailman 3 REST API.Requirementsmailmanclientrequires Python 3.7 or newer.DocumentationAsimple guideto using the library is available within this package, in
the form of doctests.   The manual is also available online at:https://mailmanclient.readthedocs.io/en/latest/Project detailsThe project home page is:https://gitlab.com/mailman/mailmanclientYou should report bugs at:https://gitlab.com/mailman/mailmanclient/issuesYou can download the latest version of the package either from theCheese Shop:http://pypi.python.org/pypi/mailmanclientor from the GitLab page above.  Of course you can also just install it withpipfrom the command line:$ pip install mailmanclientYou can grab the latest development copy of the code using Git, from the Gitlab
home page above. If you have Git installed, you can grab your own branch of
the code like this:$ git clone https://gitlab.com/mailman/mailmanclient.gitYou may contact the developers viamailman-developers@python.orgAcknowledgementsMany thanks to Florian Fuchs for his contribution of an initial REST
client. Also thanks to all the contributors of Mailman Client who have
contributed code, raised issues or devoted their time in any capacity!
Package: mailman-discard
This is a console application, which fetches the list of pending
administrative requests from one or more Mailman lists that you
moderate.  It will then present the messages to you, in batches of 15
(configurable), and if they are all spam you can discard all of them
simply by pressing “y RET”.The mechanize module is used, so you must install it first.
Seehttp://wwwsearch.sourceforge.net/mechanize/This also includes the choices.py module, which is an implementation
of the Choices system for selecting a configuration file.
Seehttp://rox.sourceforge.net/choices.html
Package: mailman-hyperkitty
This module contains aMailmanarchiver plugin which sends emails toHyperKitty, the web archiver.All documentation on installing HyperKitty can be found in the documentation
provided by theHyperKittypython package. It is also available online at
the following URL:http://hyperkitty.readthedocs.org.All documentation on installing HyperKitty Plugin can be found in the
documentation provided by the following URL:http://hyperkitty.readthedocs.io/en/latest/install.html#connecting-to-mailman.The source code is available on GitLabhttps://gitlab.com/mailman/mailman-hyperkitty.
It is developed by the same people who develop HyperKitty, so you can use the
same communication channels to reach them.Changelog1.2.1Deliver messages to HyperKitty as bytes rather than as string since
HyperKitty parses them as bytes.Handle unhandled exceptions trying to get Mailinglist urls. (Fixes #4, #20)Add support for Python 3.10.Drop support for Python 3.6 and add support for Python 3.11.1.2.0Update the authentication to call Hyperkitty using the API key as a part of
Authorization HTTP header instead of url parameter.Copyright & LicensingThis module is licensed under theGPL v3.0Copyright (C) 2014-2021 by the Free Software Foundation, Inc.
Package: mailman-public-inbox
This module contains aMailmanarchiver plugin which sends emails to
thePublic Inboxarchiver.The source code is available on Githubhttps://github.com/tohojo/mailman-public-inboxAssumptionsFor this archiver to work, you need a working public-inbox installation that has
been initialised for your mailing list. Basically, you need to have runpublic-inbox-initandpublic-inbox-indexfor the list already (see their
man pages for instructions).The archiver will runpublic-inbox-mda--no-precheckfor each message, after
first parsing the public-inbox config to find the list ID using either the
posting_address or list_id config options from public-inbox. The archiver will
also generate a permalink for the message based on the ‘url’ public-inbox config
parameter and the message ID, which will be used by mailman for the Archived-At
header.Copyright & LicensingThis module is licensed under theGPL v3.0Copyright (C) 2021 by Toke Høiland-Jørgensen
Package: mailman-rest-event-tim
Mailman event senderThis package is a plugin formailman 3which allows to send webhook-like events to configurable endpoints.ConfigurationAs for every plugin, register it inmailman.cfg:[plugin.mailman_rest_event]class:mailman_rest_event.plugin.RestEventPluginenabled:yes# Or specify your own locationconfiguration:/etc/mailman3/mailman-rest-event.cfgThen configure the plugin inmailman-rest-event.cfg:[general]# URL to which events will be sentwebhook_url:https://example.com/mailman/event# Response timeout for event callstimeout:2# Username and key used to authenticate the URL# These credentials will be sent as Authorization Basic header[auth]user:auth_userkey:auth_key
Package: mailman-web
This is a Django project that contains default settings and url settings for
Mailman 3 Web Interface. It consists of the following sub-projects:PostoriusHyperkittyInstallTo install this project, you run:$ pip install mailman-webIf you want to install the latest development version from Git, run:$ pip install git+https://gitlab.com/mailman/mailman-webChangelog0.0.8 (2023-10-22)Bump min version dependency on django-mailman3, which will clear all existing
django sessions so that changes in session serializer doesn’t cause errors.0.0.7 (2023-10-21)[BREAKING] Reduce the default no. of workers for qrunner to 2. (Fixes #17)[BREAKING] Due to change in Django’sSESSION_SERIALIZER, it will cause
all existing sessions to cause 500 errors, unless they are removed from the
database. To do that, you can upgrade to django-mailman3 1.3.10, which will
remove all current sessions. (See !25)Add a new settings modulemailman_web.settings.devfor development purposes.
To use this, you can runexport DJANGO_SETTINGS_MODULE=mailman_web.settings.devand then runmailman-webcommands for dev purposes.Min Python version has been upgraded to 3.9 since the same is required for Core.Print a warning if a user sets bothDJANGO_SETTINGS_MODULEandMAILMAN_WEB_CONFIGas the former overrides the latter. (Fixes #7)FixesInstead of overridingPYTHONPATHenv var always, append to it if it has
already been defined. (Fixes #19)Project detailsProject home:https://gitlab.com/mailman/mailman-webReport bugs at:https://gitlab.com/mailman/mailman-web/-/issuesDocumentation:https://mailman-web.readthedocs.io/en/latest/Mailman Documentation:https://docs.mailman3.orgLicenseMailman suite is licensed under theGNU GPL v3.0 or later (GPLv3+)Copyright (C) 2020 by the Free Software Foundation, Inc.
Package: mailmap-generator
What is this?This tool,mailmap-generatorsuggests a Git.mailmapfile based on the commit history.
It is intended to support you when you have a repository for which you do not have a.mailmapfile yet but want to create one.Installationpip install mailmap-generatorRequirementsThe tool requires thatgitis installed and accessible onPATH.How to use it?You have to either point the tool to a directory containing a Git repository.
From the terminal, the tool can be run as in the following:Usage:
  mailmap <repository>
  mailmap -h | --help
  mailmap --version

Options:
  -h --help             Show this screen.
  --version             Show version.For example, if you wanted to create a.mailmapfile for thepsf/requestsrepository, it could be done as in the following:$gitclonehttps://github.com/psf/requests
$mailmaprequests>requests/.mailmap
$nanorequests/.mailmapThe above shows, that the tool just prints a suggested.mailmapfile to stdout. Be aware of that the tool onlysuggestsa.mailmapfile.
It might be wrong. Since the tool maps same author names, you have to inspect and double check if the suggested file is correct.Calling it from code:frommailmap_generator.mailmapimportcreate_mailmapmailmap_str=create_mailmap("<path_to_repo>")How does the tool create the.mailmapfile?Currently, the tool works in two stages. In the first stage, authors with the same email address are mapped to one author name. Secondly, all authors with the exact same name -- and potentially different email addresses -- are mapped to another. That second step might be wrong in case of authors with same names but different email addresses are actually two different persons.Alternative toolsViaStackOverflowone findsgenmailmap.shandmailmap_update.py. The latter is removed from the project, i.e., not maintained anymore and inner workings of the former is not entirely clear to me :) Therefore, I created this tool.
Package: mailmitt
# MailMittMailMitt is a tool for performing regression testing on email delivery code.It allows applications to send emails to an SMTP server without actual emailsbeing delivered to anyone.It also provides both a web interface and a RESTful JSON API for reviewing thecontent of the emails that you send.Nothing is actually delivered, and any emails that MailMitt receives are juststored in memory.It is inspired by https://github.com/ThiefMaster/maildump, although it isre-written from the ground up using an asyncio-based event loop rather than gevent.Because of this, it only runs on Python 3.5 and above, whereas MailDump only runs onPython 2.## Installation```bashpip3 install mailmitt```## Usage`mailmitt --help`produces a list of available command line arguments.By default mailmitt runs its webserver on port1080 and its SMTP server on port 1025 (both only available via localhost). Ifyou want to access it from another machine, use something like this:`mailmitt --http-ip 0.0.0.0 --smtp-ip 0.0.0.0`## API`GET http://localhost:1080/messages`* Gets all emails, including their content, as a JSON tree.`GET http://localhost:1080/messages/0.source`* Gets the source for the first email. Replace `0` with the index of the email you wish to retrieve`GET http://localhost:1080/messages/0.plain`* Gets the plaintext version of the first email.`GET http://localhost:1080/messages/0.html`* Gets the HTML version of the first email if it exists.`GET http://localhost:1080/messages/0.json`* Gets a JSON representation of the first email.`DELETE http://localhost:1080/messages`* Deletes all emails from memory## Sample UsageRun this in one terminal:```bashmailmitt```And then in a python3 session:```pythonimport requestsimport smtplibfrom email.message import EmailMessagemessage = EmailMessage()message['Subject'] = "Sample Subject"message['To'] = "to@example.com"message['From'] = "from@example.com"message.set_content("""\HelloThis is a sample email""")message.add_alternative("""<h1>Hello</h1><p>This is a sample email</p>""", subtype='html')with smtplib.SMTP('localhost',port=1025) as smtp:smtp.sendmail(message['From'],message['To'],message.as_string())print(requests.get('http://localhost:1080/messages/0.plain').text.strip())```Although this example is in Python, MailMitt can be accessed from SMTP clientlibraries in any language.```HelloThis is a sample email```## WebserverYou will also be able to review your emails at http://localhost:1080/