def AEMmailer.AEMMailer.__init__ |
( |
|
self, |
|
|
|
q, |
|
|
|
stopEvt |
|
) |
| |
create an instance by loading account info from local csv file
then login
the set constant fields subject and template
def AEMmailer.AEMMailer.connectAndSend |
( |
|
self, |
|
|
|
outgoing |
|
) |
| |
try to connect to server, login, and send email after formatting outgoing arg.
all failure are handled and do not stop exectuion,
print to stdout if mail is sent
@param outgoing : a string to be formatted as the email body tex
def AEMmailer.AEMMailer.getMsg |
( |
|
self, |
|
|
|
textBody |
|
) |
| |
returns a fully formatted email based on string argument
@param textBody a string that will be formatted into the email
@return the fully formatted email
def AEMmailer.AEMMailer.initToListAndSender |
( |
|
self, |
|
|
|
sender = True , |
|
|
|
toLis = True , |
|
|
|
filenName = './mail.csv' |
|
) |
| |
read the csv file and obtain from it senderGmail and toList
@param sender if True the sender is read from file
@param toLis if True the toLis is read from file
@param fileName the csv file containing 1 row of headers and 1 row of data
def AEMmailer.AEMMailer.login |
( |
|
self | ) |
|
try to connect to server, in case of failure, raise and exit
get a hush password from user, try to login, if no password entered, raise NoPassword Exception
if password, try to login, if failure, loop,
if success, ave password for future use as self.gmailPassword
def AEMmailer.AEMMailer.run |
( |
|
self | ) |
|
def AEMmailer.AEMMailer.setSender |
( |
|
self, |
|
|
|
csvFile |
|
) |
| |
read the self.SenderGmail from the csvFile
@param csvFile an open csv file ready for reading
def AEMmailer.AEMMailer.setToList |
( |
|
self, |
|
|
|
csvFile |
|
) |
| |
read the self.toList elts from the csvFile
@param csvFile an open csv file ready for reading
AEMmailer.AEMMailer.gmailPassword |
AEMmailer.AEMMailer.msgBlankText |
<! subject line for emails
AEMmailer.AEMMailer.senderGmail |
AEMmailer.AEMMailer.stopEvent |
AEMmailer.AEMMailer.subject |
AEMmailer.AEMMailer.toList |
The documentation for this class was generated from the following file:
- /home/bob/Desktop/temp/Yannick/PhD_Support/temp/SPI/RPI/Python/serialApp/AEMmailer.py