Skip to main content

Add a short description here!

Project description

This will take a screenshot of a website and send it to a set of email addresses. This can be useful for dashboards, or other frequently updating websites that you want to have automatically delivered to your inbox.

Description

To run the script, you can either use command line arguments, a configuration file, or a mix of both.

Installation

To install, simply run:

pip install websitemailer

Running

To run it by command line, run:

python -m websitemailer.main <cmd line args>

For example, this would take a screenshot of google.com and send it through smtp.gmail.com.:

python -m websitemailer.main -s smtp.gmail.com -u <smtp username> -p <smtp password> -r http://www.google.com -t <to email address> -f <from email address>

You can also use a config file.:

mailings: [{
   'to_emails': ['bcdotnotifications1@gmail.com'],
   'from_email': 'bcdotnotifications1@gmail.com',
   'subject': 'Test config subject1',
   'message': 'Test message1',
   'url': ['http://www.google.com']
   },
   {
   'to_emails': ['bcdotnotifications1@gmail.com'],
   'from_email': 'bcdotnotifications1@gmail.com',
   'subject': 'Test config subject2',
   'message': 'Test message2',
   'url': ['http://www.yahoo.com']
   }]

smtp-server: 'test_server_config'
smtp-username: 'test_username_config'
smtp-password: 'test_password_config'
chrome-bin: 'c:\testbin\config'

Testing

To run the test suite, run:

python -m tox -e py39 -- --email_username bcdotnotifications@gmail.com --email_password eV^5d97% --smtp_server smtp.gmail.com --pop_server pop.gmail.com

Sometimes, Gmail will reject the login from the tests. In that case, you need to log into the account, and then go to https://accounts.google.com/DisplayUnlockCaptcha

Note

This project has been set up using PyScaffold 4.0.2. For details and usage information on PyScaffold see https://pyscaffold.org/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

websitemailer-1.0.2.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

websitemailer-1.0.2-py2.py3-none-any.whl (9.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file websitemailer-1.0.2.tar.gz.

File metadata

  • Download URL: websitemailer-1.0.2.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for websitemailer-1.0.2.tar.gz
Algorithm Hash digest
SHA256 8b08a27f5d2c8027b3011afab2af97a3e82773695770fcc9eeafdd59fbd2438e
MD5 4b521a782da6759dd5e97432bf2ec094
BLAKE2b-256 b87e4449bb4d8cb920c45f911d1c5ad5f63f3ceadc36e031c0848ee5b524a1d3

See more details on using hashes here.

File details

Details for the file websitemailer-1.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: websitemailer-1.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for websitemailer-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 868d9a317139bbf6186d2af1a1e7ca2317ee5ffb840cff4c1564af759e286f34
MD5 3bcc5ab1c22168b9639a0de533a8cf94
BLAKE2b-256 ee110e4230f526f1c1637a990ca056655828314abd3bd28cee1dccd124b3a321

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page