Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.

Commit

Permalink
update notebooks for a gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Dec 20, 2016
1 parent 043ba4a commit a590523
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -229,9 +229,12 @@ version.txt
*/sphinxdoc/source/pymmails/*
*/sphinxdoc/source/all*.rst
*/sphinxdoc/source/coverage/*
*/sphinxdoc/source/notebooks/*
_doc/sphinxdoc/source/notebooks/*
*/sphinxdoc/source/gynotebooks/*
_doc/sphinxdoc/source/gyexamples/*
_doc/sphinxdoc/source/examples/*
_doc/sphinxdoc/source/gallery/*
_doc/sphinxdoc/source/gallerynb/*
build_help.bat
_doc/sphinxdoc/source/blog/*.rst
_doc/sphinxdoc/source/blog/rss.xml
Expand Down
4 changes: 4 additions & 0 deletions _doc/notebooks/README.txt
@@ -0,0 +1,4 @@
Notebook Gallery
================


40 changes: 35 additions & 5 deletions _doc/notebooks/send_email.ipynb
Expand Up @@ -4,7 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Send email"
"# Send email\n",
"\n",
"Send mails with attachments from a notebook."
]
},
{
Expand All @@ -15,7 +17,8 @@
},
"outputs": [],
"source": [
"with open(\"erty.txt\", \"w\") as f : f.write(\"try.try.try\")"
"with open(\"erty.txt\", \"w\") as f:\n",
" f.write(\"try.try.try\")"
]
},
{
Expand Down Expand Up @@ -44,7 +47,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In fonction create_smtp_server, the string ``gmail`` is replaced by ``smtp.gmail.com:567`` (tls version). By default, the server cannot be accessed unless IMAP is enabled (see [Problems sending mail with POP or IMAP](https://support.google.com/mail/answer/78775)). You can usually find this string by searching on internet for ``your provider smtp server``, you find pages such as [configuration des serveurs sortants et entrants des principaux comptes mails](http://assistance.orange.fr/configuration-des-serveurs-sortants-et-entrants-des-principaux-comptes-mails-1222.php). However, by doing this, you need to send your password. You should remove your password wherever it appears as soon as you don't need it anymore. If you forget, I advise you to change it."
"In fonction [create_smtp_server](http://www.xavierdupre.fr/app/pymmails/helpsphinx/pymmails/sender/email_sender.html#pymmails.sender.email_sender.create_smtp_server), the string ``gmail`` is replaced by ``smtp.gmail.com:567`` (tls version). By default, the server cannot be accessed unless IMAP is enabled (see [Problems sending mail with POP or IMAP](https://support.google.com/mail/answer/78775)). You can usually find this string by searching on internet for ``your provider smtp server``, you find pages such as [configuration des serveurs sortants et entrants des principaux comptes mails](http://assistance.orange.fr/configuration-des-serveurs-sortants-et-entrants-des-principaux-comptes-mails-1222.php). However, by doing this, you need to send your password. You should remove your password wherever it appears as soon as you don't need it anymore. If you forget, I advise you to change it."
]
},
{
Expand Down Expand Up @@ -81,17 +84,44 @@
"server.quit()"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"Module [keyring](https://pypi.python.org/pypi/keyring/) should be used to store password instead of letting them accessible in the notebook."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {},
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
}

0 comments on commit a590523

Please sign in to comment.