diff -r 3fc8dfeb6ebe -r b99e7fd55fd3 src/eric7/Documentation/Source/eric7.EricNetwork.EricGoogleMail.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/eric7/Documentation/Source/eric7.EricNetwork.EricGoogleMail.html Thu Jul 07 11:23:56 2022 +0200 @@ -0,0 +1,384 @@ +<!DOCTYPE html> +<html><head> +<title>eric7.EricNetwork.EricGoogleMail</title> +<meta charset="UTF-8"> +<link rel="stylesheet" href="styles.css"> +</head> +<body> +<a NAME="top" ID="top"></a> +<h1>eric7.EricNetwork.EricGoogleMail</h1> + +<p> +Module implementing a dialog to send bug reports. +</p> +<h3>Global Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> + +<table> + +<tr> +<td><a href="#EricGoogleMail">EricGoogleMail</a></td> +<td>Class implementing the logic to send emails via Google Mail.</td> +</tr> +<tr> +<td><a href="#EricGoogleMailAuthBrowser">EricGoogleMailAuthBrowser</a></td> +<td>Class implementing a simple web browser to perform the OAuth2 authentication process.</td> +</tr> +</table> +<h3>Functions</h3> + +<table> + +<tr> +<td><a href="#GoogleMailHelp">GoogleMailHelp</a></td> +<td>Module function to get some help about how to enable the Google Mail OAuth2 service.</td> +</tr> +</table> +<hr /> +<hr /> +<a NAME="EricGoogleMail" ID="EricGoogleMail"></a> +<h2>EricGoogleMail</h2> + +<p> + Class implementing the logic to send emails via Google Mail. +</p> +<h3>Signals</h3> +<dl> + +<dt>sendResult(bool, str)</dt> +<dd> +emitted to indicate the transmission result + and a result message +</dd> +</dl> +<h3>Derived from</h3> +QObject +<h3>Class Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Class Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> + +<table> + +<tr> +<td><a href="#EricGoogleMail.__init__">EricGoogleMail</a></td> +<td>Constructor</td> +</tr> +<tr> +<td><a href="#EricGoogleMail.__credentialsFromSession">__credentialsFromSession</a></td> +<td>Private method to create a credentials object.</td> +</tr> +<tr> +<td><a href="#EricGoogleMail.__doSendMessages">__doSendMessages</a></td> +<td>Private method to send all queued messages.</td> +</tr> +<tr> +<td><a href="#EricGoogleMail.__loadToken">__loadToken</a></td> +<td>Private method to load a token from the token file.</td> +</tr> +<tr> +<td><a href="#EricGoogleMail.__prepareMessage">__prepareMessage</a></td> +<td>Private method to prepare the message for sending.</td> +</tr> +<tr> +<td><a href="#EricGoogleMail.__processAuthorization">__processAuthorization</a></td> +<td>Private slot to process the received authorization code.</td> +</tr> +<tr> +<td><a href="#EricGoogleMail.__saveToken">__saveToken</a></td> +<td>Private method to save a token to the token file.</td> +</tr> +<tr> +<td><a href="#EricGoogleMail.__startSession">__startSession</a></td> +<td>Private method to start an authorized session and optionally start the authorization flow.</td> +</tr> +<tr> +<td><a href="#EricGoogleMail.sendMessage">sendMessage</a></td> +<td>Public method to send a message via Google Mail.</td> +</tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<a NAME="EricGoogleMail.__init__" ID="EricGoogleMail.__init__"></a> +<h4>EricGoogleMail (Constructor)</h4> +<b>EricGoogleMail</b>(<i>parent=None</i>) + +<p> + Constructor +</p> +<dl> + +<dt><i>parent</i> (QObject)</dt> +<dd> +reference to the parent object +</dd> +</dl> +<a NAME="EricGoogleMail.__credentialsFromSession" ID="EricGoogleMail.__credentialsFromSession"></a> +<h4>EricGoogleMail.__credentialsFromSession</h4> +<b>__credentialsFromSession</b>(<i></i>) + +<p> + Private method to create a credentials object. +</p> +<dl> +<dt>Return:</dt> +<dd> +created credentials object +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +google.oauth2.credentials.Credentials +</dd> +</dl> +<a NAME="EricGoogleMail.__doSendMessages" ID="EricGoogleMail.__doSendMessages"></a> +<h4>EricGoogleMail.__doSendMessages</h4> +<b>__doSendMessages</b>(<i></i>) + +<p> + Private method to send all queued messages. +</p> +<a NAME="EricGoogleMail.__loadToken" ID="EricGoogleMail.__loadToken"></a> +<h4>EricGoogleMail.__loadToken</h4> +<b>__loadToken</b>(<i></i>) + +<p> + Private method to load a token from the token file. +</p> +<dl> +<dt>Return:</dt> +<dd> +loaded token +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +dict or None +</dd> +</dl> +<a NAME="EricGoogleMail.__prepareMessage" ID="EricGoogleMail.__prepareMessage"></a> +<h4>EricGoogleMail.__prepareMessage</h4> +<b>__prepareMessage</b>(<i>message</i>) + +<p> + Private method to prepare the message for sending. +</p> +<dl> + +<dt><i>message</i> (email.mime.text.MIMEBase)</dt> +<dd> +message to be prepared +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +prepared message dictionary +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +dict +</dd> +</dl> +<a NAME="EricGoogleMail.__processAuthorization" ID="EricGoogleMail.__processAuthorization"></a> +<h4>EricGoogleMail.__processAuthorization</h4> +<b>__processAuthorization</b>(<i>authCode</i>) + +<p> + Private slot to process the received authorization code. +</p> +<dl> + +<dt><i>authCode</i> (str)</dt> +<dd> +received authorization code +</dd> +</dl> +<a NAME="EricGoogleMail.__saveToken" ID="EricGoogleMail.__saveToken"></a> +<h4>EricGoogleMail.__saveToken</h4> +<b>__saveToken</b>(<i>token</i>) + +<p> + Private method to save a token to the token file. +</p> +<dl> + +<dt><i>token</i> (dict)</dt> +<dd> +token to be saved +</dd> +</dl> +<a NAME="EricGoogleMail.__startSession" ID="EricGoogleMail.__startSession"></a> +<h4>EricGoogleMail.__startSession</h4> +<b>__startSession</b>(<i></i>) + +<p> + Private method to start an authorized session and optionally start the + authorization flow. +</p> +<a NAME="EricGoogleMail.sendMessage" ID="EricGoogleMail.sendMessage"></a> +<h4>EricGoogleMail.sendMessage</h4> +<b>sendMessage</b>(<i>message</i>) + +<p> + Public method to send a message via Google Mail. +</p> +<dl> + +<dt><i>message</i> (email.mime.text.MIMEBase)</dt> +<dd> +email message to be sent +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="EricGoogleMailAuthBrowser" ID="EricGoogleMailAuthBrowser"></a> +<h2>EricGoogleMailAuthBrowser</h2> + +<p> + Class implementing a simple web browser to perform the OAuth2 + authentication process. +</p> +<h3>Signals</h3> +<dl> + +<dt>approvalCodeReceived(str)</dt> +<dd> +emitted to indicate the receipt of the + approval code +</dd> +</dl> +<h3>Derived from</h3> +QDialog +<h3>Class Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Class Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> + +<table> + +<tr> +<td><a href="#EricGoogleMailAuthBrowser.__init__">EricGoogleMailAuthBrowser</a></td> +<td>Constructor</td> +</tr> +<tr> +<td><a href="#EricGoogleMailAuthBrowser.__pageLoadFinished">__pageLoadFinished</a></td> +<td>Private slot handling the loadFinished signal.</td> +</tr> +<tr> +<td><a href="#EricGoogleMailAuthBrowser.__titleChanged">__titleChanged</a></td> +<td>Private slot handling changes of the web page title.</td> +</tr> +<tr> +<td><a href="#EricGoogleMailAuthBrowser.load">load</a></td> +<td>Public method to start the authorization flow by loading the given URL.</td> +</tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<a NAME="EricGoogleMailAuthBrowser.__init__" ID="EricGoogleMailAuthBrowser.__init__"></a> +<h4>EricGoogleMailAuthBrowser (Constructor)</h4> +<b>EricGoogleMailAuthBrowser</b>(<i>parent=None</i>) + +<p> + Constructor +</p> +<dl> + +<dt><i>parent</i> (QWidget)</dt> +<dd> +reference to the parent widget +</dd> +</dl> +<a NAME="EricGoogleMailAuthBrowser.__pageLoadFinished" ID="EricGoogleMailAuthBrowser.__pageLoadFinished"></a> +<h4>EricGoogleMailAuthBrowser.__pageLoadFinished</h4> +<b>__pageLoadFinished</b>(<i></i>) + +<p> + Private slot handling the loadFinished signal. +</p> +<a NAME="EricGoogleMailAuthBrowser.__titleChanged" ID="EricGoogleMailAuthBrowser.__titleChanged"></a> +<h4>EricGoogleMailAuthBrowser.__titleChanged</h4> +<b>__titleChanged</b>(<i>title</i>) + +<p> + Private slot handling changes of the web page title. +</p> +<dl> + +<dt><i>title</i> (str)</dt> +<dd> +web page title +</dd> +</dl> +<a NAME="EricGoogleMailAuthBrowser.load" ID="EricGoogleMailAuthBrowser.load"></a> +<h4>EricGoogleMailAuthBrowser.load</h4> +<b>load</b>(<i>url</i>) + +<p> + Public method to start the authorization flow by loading the given URL. +</p> +<dl> + +<dt><i>url</i> (str or QUrl)</dt> +<dd> +URL to be laoded +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="GoogleMailHelp" ID="GoogleMailHelp"></a> +<h2>GoogleMailHelp</h2> +<b>GoogleMailHelp</b>(<i></i>) + +<p> + Module function to get some help about how to enable the Google Mail + OAuth2 service. +</p> +<dl> +<dt>Return:</dt> +<dd> +help text +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +str +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file