Saravanan666/pypi-org huggingface dataset:
Package: mail-sendgrid
mail-sendgridmail-sendgrid--helpUsage: mail-sendgrid [OPTIONS]

  Cli tool for send mail over sendgrid.

Options:
  -f, --from EMAIL         Email address to send from.  [required]
  -t, --to EMAIL/FILE      Email address or file with address, recipient to
                           receive of this email.  [multiple]  [required]
  --cc EMAIL/FILE          Email address or file with address, recipient to
                           receive a copy of this email.  [multiple]
  --bcc EMAIL/FILE         Email address or file with address, recipient to
                           receive a blind carbon copy of this email.
                           [multiple]
  -s, --subject SUBJECT    Email subject.  [required]
  -c, --content TEXT/FILE  Email content, support jinja2 template.  [required]
  -a, --attachment FILE    Email attachment.  [multiple]
  --var KEY VALUE          Jinja2 template variable.  [multiple]
  --variable-yaml FILE     Jinja2 template variables in YAML format.
                           [multiple]
  --nl2br                  Replace all new line with br tag.
  --no-send                Skip send, print rendered content.
  --apikey APIKEY          Sendgrid api key or use env: SENDGRID_API_KEY.
                           [required]
  --version                Show the version and exit.
  -v, --verbosity LVL      Either CRITICAL, ERROR, WARNING, INFO or DEBUG
  --help                   Show this message and exit.Developmentgit clone git@github.com:hardwario/mail-sendgrid.git
cd mail-sendgrid
sudo python3 setup.py develop
Package: mailserver
Develop Mailservices in Django==============================Django Mailserver is an application that lets you developmail services in your Django projects/applications in a mannerthat handles messages as Django handles HTTP requests.That project was initialy conceived as an improvement over`django-smtpd`_ by Denis Laprise, then became an almost full rewriteand when I thought I had gone through almost every line of code itseemed far much more like a fork than improvement.NOTE: that this is really alpha software, don't use it in a productionenvironment unless you expect it to break everything ;).. _django-smtpd:: http://code.google.com/p/django-smtpd/Example usage:==============First of all, you need to add "mailserver" in your INSTALLED_APPS, andyou'll want the settings::ROOT_MAILCONF = 'myproject.mailbox' # Just like ROOT_URLCONF, but for# resolving recipients.MAILER_DAEMON_ADDRESS = 'postmaster@mydomain.com'``ROOT_MAILCONF`` is just like an URLCONF, but it matches e-mail addressesinstead of paths. An example ``myproject.mailbox`` ``mailbox.py`` filewould be::from django_mailserver.mailbox import *urlpatterns = patterns('',(r'@bugs.example.com', include('myapp.mailbox')),)Note, that when matching recipients, just as Django strips path elementsas they get matches, ``mailserver`` strips already matched parts fromthe addresses until it reaches the views.Now you can start you mail service! You can either to::./manage.py startmailapp <app_name>From your project directory to have a new app created with a sample mailbox.pyfile in it, or you can create a new mailbox.py file in your existing application::from django_mailserver.mailbox import *urlpatterns = patterns('',(r'^onedest', 'myapp.mailers.reply'),)You have it, your ``mailers.py`` file would be just like a ``views.py``::from mailserver import EmailResponsedef reply(request):print "Got email %s, Reply!" % requestreturn EmailResponse(from_email=request.get_recipient_display(),to=request['From'],body=request.get_body(),subject="Re: %s" % request['Subject'])You get the idea, if you return an EmailResponse it gets ``send()``later by the Handler. You can also return EmailIgnoreResponse among others.Delivering mails****************Right now the only possible way to deliver messages to this is through apipe transport to the ``./manage.py readmail`` command. Which is mostlyintended for testing.Further improvements should have a more performant pipe transport and aself-running SMTP server.TODO******WARNING:** Django Mailserver is still under development. It is believed tobrake at any point ;) There are lots of things to do, like:* Documentation* More tests.* Better URL parsing (i.e: includes work on domains, others on addreses).* Handling address prefixes/suffixes* Handling of error responses (ie: pipe transport should bring theresponse status_code to the exit value of the process).
Package: mailserver-admin
mailserver-adminThis application managesdomains,usersandaliasesof a mail server.This has been tested withdovecot, using either mysql or postgresql database.The main goal was to enhance/replaceJeffrey Boehm’s PHP mailserver-admin applicationbecause I didn’t want to have a mail server administration application in PHP and I wanted to have administration account per domain.Environment variablesRequired:DJANGO_SECRET_KEY: at least 40 characters. Should be specified for production.DJANGO_DB_TYPE:postgresormysql, default tomysql.DJANGO_DB_HOST: database hostname, default todb(for use in docker-compose).DJANGO_DB_PORT: database port, default to empty (default port).DJANGO_DB_NAME: database name, default tomailserver.DJANGO_DB_USER: database user, default tomailserver.DJANGO_DB_PASSWORD: database password, default tochangeme.Optional:DJANGO_DEBUG: defaultFalse. Set toTrueto enable debug toolbar, more logs and static files served.DJANGO_LOG_LEVEL: default toWARNING(INFOifDJANGO_DEBUG).DJANGO_RUNSERVER_LOG_LEVEL: default toINFO(DEBUGifDJANGO_DEBUG). Used only when run withrunserverorrunserver_plus.DJANGO_TZ: timezone, defaut toUTC.DJANGO_WEBMAIL_URL: webmail url to show in the footer, default to no link.DJANGO_VENDOR_NAME: any vendor name you want to appear on the footer, default toSources.DJANGO_VENDOR_URL: any url you want to be linked to your vendor name, default to this repository url. Set to empty to disable the link.DJANGO_HIDE_VERSION: defaultFalseifDJANGO_DEBUGelseTrue. Set toTrueto hide themailserver-adminversion.Install from PyPiVirtualEnv and DependenciesMinium python version is3.9.Use:pipenvinstallmailserver-adminto install it without any database backend.If you want to install themysqlorpostgresqldatabase backend alongside, use for instance:pipenvinstallmailserver-admin[mysql]ConfigurationDefine the required environment variables then:exportDJANGO_SETTINGS_MODULE=mailserveradmin.config.settings
pipenvrundjangomigrate
pipenvrundjangocreatesuperuser
TODOYou can now server the application using anyWSGIserver pointing to$(VISUAL='readlink -f' pipenv open mailserveradmin|tail -n1)/config/wsgi.py.Don’t forget to also serve static ressources located at$(VISUAL='readlink -f' pipenv open mailserveradmin|tail -n1)/to_servefolder.You can of course make symlinks to those locations to simplify configuration.Install from sourcesVirtualEnv and DependenciesUse:pipenvsync-dto install dependencies. Default python version is3.9.InstallationYou should also install a database driver, eithermysqlclientorpsycopg2-binary:pipenvrunpipinstallmysqlclientConfigurationDefine the required environment variables then:pipenvrun./manage.pymigrate
pipenvrun./manage.pycreatesuperuser
pipenvrun./manage.pycollectstaticYou can now server the application using anyWSGIserver pointing to theconfig/wsgi.pyfile.Don’t forget to also serve thestatic/folder.Alternatively, you can test the application withpipenv run ./manage.py runserver_plusbut this should only be used for testing/development.
Package: mailshake
MailshakeAlthough Python makes sending email relatively easy via the smtplib
module, this library provides a couple of light wrappers over it.These wrappers make sending email extra quick, easy to test email
sending during development, and provides support for platforms that
can't use SMTP.Mailers availiable:SMTPMailerAmazonSESMailerToConsoleMailer (prints the emails in the console)ToFileMailer (save the emails in a file)ToMemoryMailer (for testing)DummyMailer (does nothing)Usage:frommailshakeimportSMTPMailermailer=SMTPMailer()mailer.send(subject='Hi',text_content='Hello world!',from_email='from@example.com',to=['mary@example.com','bob@example.com'])You can also compose several messages and send them at the same time:frommailshakeimportSMTPMailer,EmailMessagemailer=SMTPMailer()messages=[]email_msg=EmailMessage("Weekend getaway","Here's a photo of us from our trip.","from@example.com","bob@example.com")email_msg.attach_file("picture.jpg")messages.append(email_msg)#…mailer.send_messages(*messages)Install for developmentFirst, create an activate a virtualenv. eg:python-mvirtualenv.venvsource.venv/bin/activateThen runpip install -e .[dev]ormake install. This will install the library in editable mode and all its dependencies.
Package: mailshell
Mailshell - mslsend and check emails :email: faster from the terminal using MailshellRequirementspython 3.7+Linux or MacOSInstallationpythonpipinstall$python-mpipinstallmailshellSupport python 3.7+Usagejust typemslfollowed by one of the mailshell commands
See how to use mailshell and find all the arguments, option in theDocumentation.typemsl loginto log in with gamilapp password, andmsl newto create a new message$msllogin
Emailaddres:user@example.com
Emailapppassword:****************usemsl setcommand to write your email usingnanoeditor ormsl htmlto add html message, and you can also add a text from a txt file with-foption insetandhtmlcommand.$mslset-f./your_text.txtusemsl addwith a file or image to include it andmsl rmto remove it from your message.$msladdfile.pdf
$msladdimage.jpg
$mslrmfile.pdfusemsl contentto see your message content, and add--filesor--imagesto see a list of the message attachments.$mslcontent=============Yourmessage=============Subject:message
From:name<user@example.com>

themessage...
----------------------------------------
-includes:file.xlsximage.png...runmsl sendto send your message to specified accounts.$mslsend-Tother@example.comyou can usemsl checkcommand to check your emails with a specified mailbox with-boption (Inboxis the default) and someselection optionssuch as--alland--from, and use-lto display the output as a list.$mslcheck-bsent--date18-09-2015
email(1)email(2)email(3)...use the same selection options inmsl deleteto delete the selected emails in the mailbox$msldelete-t"You won.."-nCommandsUse--helpin mailshell to see the available commands:CommandDescriptionloginlog in to your gmail using email address and theapp passwordcredprint your current email address and app passwordnewcreate new email messagesubjectset a new subject to the messagefromset a new sender namehtmladdhtmlmessagecontentsee the current message content with the included filessetadd a text manually or from.txtfile to you current messageaddadd a file or image to your messagermremove a file or image from your messagetoset your contact that you will send tosendsend the current messagecheckcheck your emails in a mailbox usingselection optionsdeletedelete the selected email with the deleteoptionsin mailboxlogoutlog out from mailshell$msl--helpadd--versionoption to see your current version.SupportFor support, Follow on twitter@malkiAbdoo.
Package: mailshot
MailshotMailshot is a wrapper around smtplib's SMTP connection and simplifying sending of email using python.ExamplefrommailshotimportMailshotmailshot=Mailshot()mailshot.compose("to@example.com",subject="Example")mailshot.send()InstallRun the following commandpipinstallmailshotUsername & PasswordUsage ofapplication specific passowrdis recommended. Store it in the environment variable. UseEMAILfor storing the Gmail address andPASSWORDfor storing application-specific passwords (recommended).If you want to store the password in the script, you can do it as follows.frommailshotimportMailshotmailshot=Mailshot("u@example.com","password")The best way to can take the password as an input.frommailshotimportMailshotpassword=input("Password : ")mailshot=Mailshot("u@example.com",password)If you don’t want your password to show on your screen when you type it, you can import the getpass module and use.getpass()instead for blind input of your password.Usagecompose()method takes following argumentsto(required): A string or list of strings of recipients.cc(optional): A string or list of strings of recipients of the carbon copy.bcc(optional): A string or list of strings of recipients of the blind carbon copy.subject(optional): A subject string.text(optional): A text string.html(optional): A html string to render.files(optional): A file or list of files.ExamplefrommailshotimportMailshotmailshot=Mailshot()mailshot.compose("to@example.com",cc=["one@example.com","two@example.com"],subject="Test Mail",text="Test Mail",files=["test.pdf","test.png"])FeaturesMailshot allows you toSend mail to bulk of recipients.Send text and HTML body.Send bulk of files.Send the personalised email.AuthorMailshot is developed by Rohan Pednekar.LicenseEnvelopes is licensed under the MIT License.Source CodeSource code is available on GitHub at:rohan-pednekar/mailshot.IssuesTo file issue reports and feature requests use the project's issue tracker on GitHub.
Package: mailsnake
MailSnakeis a Python wrapper forMailChimp API 1.3(as well as theSTS API,Export API, andMandrill API) (Now with support for Python 3)Installationpip install mailsnakeUsageBasic Pingfrom mailsnake import MailSnake
from mailsnake.exceptions import *

ms = MailSnake('YOUR MAILCHIMP API KEY')
try:
    ms.ping() # returns "Everything's Chimpy!"
except MailSnakeException:
    print 'An error occurred. :('Mandrill Pingmapi = MailSnake('YOUR MANDRILL API KEY', api='mandrill')
mapi.users.ping() # returns "PONG!"STS Examplemcsts = MailSnake('YOUR MAILCHIMP API KEY', api='sts')
mcsts.GetSendQuota() # returns something like {'Max24HourSend': '10000.0', 'SentLast24Hours': '0.0', 'MaxSendRate': '5.0'}Catching Errorsms = MailSnake( 'my_wrong_mailchimp_api_key_that_does_not_exist')
try:
    ms.ping() # returns "Everything's Chimpy!"
except InvalidApiKeyException:
    print 'You have a bad API key, sorry.'NoteAPI parameters must be passed by name. For example:ms.listMemberInfo(id='YOUR LIST ID', email_address='name@email.com')
Package: mailsuite
mailsuiteA Python package for retrieving, parsing, and sending emails.FeaturesSimplified IMAP clientRetrieve email from any folderCreate new foldersMove messages to other foldersDelete messagesMonitor folders for new messages using the IMAPIDLEcommandAlways use/as the folder hierarchy separator, and convert to the
server's hierarchy separator in the backgroundAlways remove folder name characters that conflict with the server's
hierarchy separatorsPrepend the namespace to the folder path when requiredAutomatically reconnect when neededWork around quirks in Gmail, Microsoft 365, Exchange, Dovecot, and
DavMailConsistent email parsingSHA256 hashes of attachmentsParsedAuthentication-ResultsandDKIM-SignatureheadersParse Microsoft Outlook.msgfiles usingmsgconvertSimplified email creation and sendingEasily add attachments, plain text, and HTMLUses opportunistic encryption (STARTTLS) with SMTP by default
Package: mailtest
MailTest is a Python unittesting library that for code that sends email.
It starts a local SMTP server inside a Pythonwithblock, and
captures all the email sent to it. These emails can then be read within
the block.Example:with mailtest.Server() as mt:
    send_welcome_email()
    assert len(mt.emails) == 1Installpip3 install mailtestConfigurationConfiguration is done via kwargs tomailtest.Server(). Options: -smtp_port(default: 1025) -sendgrid_port(default:None)SpeedMailTest can test receive approx. 4000 emails/second on an Intel(R)
Core(TM) i5-7260U CPU @ 2.20GHz.Testing$ python2 test.py
..
----------------------------------------------------------------------
Ran 2 tests in 0.269s

OK$ python3 test.py
..
----------------------------------------------------------------------
Ran 2 tests in 0.543s

OK
Package: mailthon
Useful links:Documentation|Issue Tracker|PyPI PageMailthon is an email library for Python that aims to be highly
extensible and composable. Mailthon is unicode aware and supports
internationalised headers and email addresses. Also it aims to be
highly transport agnostic, meaning that SMTP can be swapped out
for other transports.>>>frommailthonimportpostman,email>>>p=postman(host='smtp.gmail.com',auth=('username','password'))>>>r=p.send(email(content=u'<p>Hello 世界</p>',subject='Hello world',sender='John <john@jon.com>',receivers=['doe@jon.com'],))>>>assertr.okPlatformsLinuxWindows
Package: mailtools
MailtoolsWriting a web application? Want to send some emails from it? Mailtools can
help!Simple API for sending plain text messages, HTML and messages with
attachments.ThreadedMailersends emails in the background and returns control
to your application immediately, even when talking to slow remote servers.Temporary sending failures are automatically retried.Running your application in test mode? TheRedirectMessageswrapper
routes emails to a test address and not to live email addresses.UsageCreating a simple SMTP mailer:from mailtools import SMTPMailer
mailer = SMTPMailer('127.0.0.1')This mailer will block until messages are sent and won’t retry failures. UseThreadedMailerto fix this:mailer = ThreadedMailer(SMTPMailer('127.0.0.1'))A mailer with TLS/STARTTLS support:mailer = SMTPMailer('127.0.0.1', 465, transport_args={'security': 'TLS'})
mailer = SMTPMailer('127.0.0.1', transport_args={'security': 'STARTTLS'})Sending a plain text message:message = 'This is a plain text message'
mailer.send_plain(
        'sender@example.com',
        ['recipient@example.com'],
        'hi',
        message
)Sending an HTML message:message = '<html><body>Look! HTML!</body></html>'
mailer.send_html(
        'sender@example.com',
        ['recipient@example.com'],
        'hi',
        message
)Adding attachments:message = 'index.rst is attached to this message'
mailer.send_plain(
        'sender@example.com',
        ['recipient@example.com'],
        'hi',
        message,
        attachments=['index.rst']
)CHANGELOG3.0.1 (released 2019-11-06)Fixed PyPI package metadata3.0.0 (released 2019-11-06)Added Python 3 supportDropped Python 2 supportVersion 2.1Added a ThreadedMailer.shutdown method (thanks to Andrew Nelis for an
initial implementation and advice on the design of this feature)Version 2Added TLS/STARTTLS support (thanks to w31rd0 for the implementation of this)Version 1Initial release
Package: mailtoplone.contentrules
Overviewcontent rules actions and conditions created for usage with mailtoploneAuthorsStefan Eletzhofer –“<stefan dot eletzhofer at inquant de>”Hans-Peter Locher –“<hans-peter dot locher at inquant de>”Copyright (c) 2007-2008 InQuant GmbH – “http://www.inquant.de”DependenciesAdditional egg dependeciesmailtoplone.baseContentsConditionsEmail Header:Checks a specified header for a specified value, value can be specified as regular expression
(will check for simple containment if value isn’t a regular
expression).Has part of type:Checks if the email contains a part of specified maintype/subtype
pair.Size of mail:Checks the size of a mail (<=, >=) against a user specified size in megabyte.ActionsDeliver:Deliver mail to another dropbox by key, uses the BaseDropBoxFactory utility defined in
mailtoplone.base to determine the dropboxes.vim: set ft=rst tw=75 nocin nosi ai sw=4 ts=4 expandtab:
Package: mailtoplone.scrawl
Dependenciesmailtoplone.base:http://pypi.python.org/pypi/mailtoplone.baseScrawl:http://pypi.python.org/pypi/Products.ScrawlExample buildoutbuildout:http://svn.plone.org/svn/collective/mailtoplone/buildout-scrawlChange historyChangelog0.2 (2009-05-10)fix issue querying multidapter with None,
now correctly use context.REQUEST
[ramonski]0.1 (2009-05-29)call add_category [hplocher]get all attachments from mail, and call add_file
for each [hplocher]
call add_file for each, before calling createdecode subject header, used as title [hplocher]refactor adapter, use IBlogEntryFactory [hplocher]add adapter to create a Blog Entry [hplocher]
(title, body text, only atm)Detailed DocumentationIntroductionWe need manager role for this test:>>> self.setRoles(('Manager',))Configure Folder for Blog EntriesWe use a standard Folder for dropping the emails in:>>> self.portal.invokeFactory('Folder', 'blog_entries')
'blog_entries'
>>> blog_entries = self.portal.blog_entriesTo enable MailDropbox functionality, we equip the
folder with an additional marker interface:>>> from zope.interface import alsoProvides
>>> from mailtoplone.scrawl.interfaces import IScrawlMailDropBoxMarker
>>> alsoProvides(blog_entries, IScrawlMailDropBoxMarker)mailtoplone uses a more generic interface IMailDropBox, to adapt the
context, we use that to call drop:>>> from mailtoplone.base.interfaces import IMailDropBox
>>> IMailDropBox(blog_entries).drop("Subject: my first blog entry")As result, we wexpect a single blog entry, with the title, id set
according to the email’s subject:>>> blog_entries.objectIds()
['my-first-blog-entry']
>>> blog_entry = blog_entries.listFolderContents()[0]
>>> blog_entry.title
u'my first blog entry'
>>> blog_entry.portal_type
'Blog Entry'ContributorsHans-Peter Locher, Author
Ramon BartlDownload
Package: mail_to_sms
Programmatically send out text messages via email.Installationpip install mail_to_smsand import like any other Python module. Or,git clonehttps://github.com/naschorr/mail-to-smslocally as needed.
Make sure to install the requirements withpip install-rrequirements.txtArgumentsnumber{string|int}: The destination phone number (ex.5551234567).carrier{string}: The destination phone number’s carrier (ex."att"). Current carriers are include:alltel,att,boost mobile,cricket wireless,metropcs,project fi,sprint,tmobile,us cellular,verizon wireless,virgin mobile.username{string} [optional]: The username for accessing the
SMTP server (ex."username"). If omitted, it’ll try to use the
username stored in the.yagmail
file.password{string} [optional]: The password for accessing the
SMTP server (ex."password"). If using Gmail and 2FA, you may
want to use an app password. If omitted, it’ll try to useyagmail’s
passwordin the keyring, otherwise it’ll prompt you for the password.contents{*yagmail
contents*}
[optional]: A yagmail friendly contents argument (ex."This is a message."). If omitted, MailToSMS’ssend()method
can be called manually.keyworded args (for extra configuration):quiet{boolean}: Choose to disable printed statements. Defaults
to False. (ex.quiet=True)region{string}: The region of the destination phone number.
Defaults to “US”. (ex.region="US"). This should only be
necessary when using a non international phone number that’s not US
based. See the phonenumbers repohere.mms{boolean}: Choose to send a MMS message instead of a SMS
message, but will fallback to SMS if MMS isn’t present. Defaults to
False. (ex.mms=True)subject{string}: The subject of the email to send (ex.subject="Thisis a subject.")yagmail{list}: A list of arguments to send to the
yagmail.SMTP() constructor. (ex.yagmail=["my.smtp.server.com","12345"]). As of 4/30/17, the args
and their defaults (after the username and password) arehost='smtp.gmail.com',port='587',smtp_starttls=True,smtp_set_debuglevel=0,smtp_skip_login=False,encoding="utf-8". This is unnecessary if you’re planning on using
the basic Gmail interface, in which case you’ll just need the
username and password. This may make more sense if you look at
yagmail’s SMTP classhere.Examplesfrom mail_to_sms import MailToSMSMailToSMS(5551234567, "att", "username@gmail.com", "password", "this is a message")MailToSMS("5551234567", "att", "username", "password", ["hello", "world"], subject="hey!")MailToSMS(5551234567, "att", "username", "password", "hello world!", yagmail=["smtp.gmail.com", "587"])MailToSMS("5551234567", "att", "username@gmail.com", "password", ["line one"], yagmail=["smtp.gmail.com"])mail = MailToSMS(5551234567, "att", "username", "password")
mail.send("this is a string!")Requirementsyagmailphonenumbersclick(for the CLI)NoteI’ve only been able to test this on AT&T, so I can’t guarantee that this
works for other carriers. Feedback is appreciated.