id int64 0 25.6k | text stringlengths 0 4.59k |
|---|---|
5,500 | by the parser and attached to the message object this is especially important if we need to save the data to file--we either have to store as bytes in binary mode filesor specify the correct (or at least compatibleunicode encoding in order to use such strings for text-mode files decoding manually works the same wayq ge... |
5,501 | binary data such as images (as we'll see in the next sectionlike mail payload partsi headers are encoded specially for emailand may also be encoded per unicode for instancehere' how to decode an encoded subject line from an arguably spammish email that just showed up in my inboxits =?utf- ?qpreamble declares that the d... |
5,502 | join(abytes decode('raw-unicode-escapeif enc =none else encfor (abytesencin parts'man where did you get that assistant?we'll use logic similar to the last step here in the mailtools package aheadbut also retain str substrings intact without attempting to decode late-breaking newsas write this in mid- it seems possible ... |
5,503 | address individuallygetaddresses ignores commas in names when spitting apart separate addressesand parseaddr doestoobecause it simply returns the first pair in the getaddresses result (some line breaks were added to the following for legibility)from email utils import getaddresses multi '"smithbobbob smith bob@bob com"... |
5,504 | ters@walmart com>pairs getaddresses([rawtoheader]pairs [('=?utf- ? ?walmart?=''newsletters@walmart com')('=?utf- ? ?walmart?=''ne wsletters@walmart com')addrs [for nameaddr in pairsabytesaenc decode_header(name)[ email+mime name abytes decode(aencunicode addrs append(formataddr((nameaddr))one or more addrs 'join(addrs'... |
5,505 | allow these to pass this may encroach on some smtp server issues which we don' have space to address in this book see the web for more on smtp headers handling for more on headers decodingsee also file _test- -headers py in the examples packageit decodes additional subject and address-related headers using mailtools me... |
5,506 | spam spamthis works for textbut watch what happens when we try to render message part with truly binary datasuch as an image that could not be decoded as unicode textfrom email message import message generic message object message( ['from''bob@bob combytes open('monkeys jpg''rb'read(read binary bytes (not unicodem set_... |
5,507 | mailtools package of this (example - because it is used by email to encode from bytes to text at initialization timeit is able to decode to ascii text per unicode as an extra stepafter running the original call to perform base encoding and arrange content-encoding headers the fact that email does not do this extra unic... |
5,508 | because bytes was really str in xthoughbecause base returns bytesthe normal mail encoder in email also leaves the payload as byteseven though it' been encoded to base text form this in turn breaks email text generationbecause it assumes the payload is text in this caseand requires it to be str as is common in large-sca... |
5,509 | print(mmime-version content-typetext/plaincharset="us-asciicontent-transfer-encoding bit abc mimetext('abc'_charset='latin- 'print(mmime-version content-typetext/plaincharset="iso- - content-transfer-encodingquoted-printable abc mimetext( 'abc'_charset='utf- 'print(mcontent-typetext/plaincharset="utf- mime-version cont... |
5,510 | used for the "latin unicode type earlier in this section--an encoding choice that is irrelevant to any recipient that understands the "latin synonymincluding python itself unfortunatelythat means that we also need to pass in different string type if we use synonym the package doesn' understand todaym mimetext('abc'_cha... |
5,511 | content-typetext/plaincharset="iso- - content-transfer-encodingquoted-printable = in factthe text message object doesn' check to see that the data you're mimeencoding is valid per unicode in general--we can send invalid utf text but the receiver may have trouble decoding itm mimetext( ' \xe '_charset='utf- 'print(mcont... |
5,512 | add_header('content-type''text/plain' ['mime-version'' set_param('charset''us-ascii' add_header('content-transfer-encoding'' bit'data 'spamm set_payload(data decode('ascii')data read as bytes here print(mmime-version content-typetext/plaincharset="us-asciicontent-transfer-encoding bit spam print(mimetext('spam'_charset... |
5,513 | today it seems the best we can do hereapart from hoping for an improved email package in few yearstimeis to specialize text message construction calls by unicode typeand assume both that encoding names match those expected by the package and that message data is valid for the unicode type selected here is the sort of a... |
5,514 | composedand respect the unicode encodings in text parts and mail headers of messages fetched to make this work with the partially crippled email package in python thoughwe'll apply the following unicode policies in various email clients in this bookuse user preferences and defaults for the preparse decoding of full mai... |
5,515 | #!/usr/local/bin/python ""#########################################################################pymail simple console email interface client in pythonuses python poplib module to view pop email messagessmtplib to send new mailsand the email package to extract mail headers and payload and compose mails###############... |
5,516 | print('error send failed'elseif failedprint('failed:'faileddef connect(servernameuserpasswd)print('connecting 'server poplib pop (servernameserver user(userserver pass_(passwdprint(server getwelcome()return server connectlog in to mail server pass is reserved word print returned greeting message def loadmessages(server... |
5,517 | pause after each def showmessage(imsglist)if < <len(msglist)#print(msglist[ - ]oldprints entire mail--hdrs+text print('- msg parser(parsestr(msglist[ - ]expects str in content msg get_payload(prints payloadstringor [messagesif isinstance(contentstr)keep just one end-line at end content content rstrip('\nprint(contentpr... |
5,518 | list elif command[ =' 'if len(command= for in range( len(msglist)+ )showmessage(imsglistelseshowmessage(msgnum(command)msglistsave elif command[ =' 'if len(command= for in range( len(msglist)+ )savemessage(imailfilemsglistelsesavemessage(msgnum(command)mailfilemsglistdelete elif command[ =' 'if len(command= delete all ... |
5,519 | already metplus handful of new techniquesloads this client loads all email from the server into an in-memory python list only onceon startupyou must exit and restart to reload newly arrived email saves on demandpymail saves the raw text of selected message into local filewhose name you place in the mailconfig module of... |
5,520 | require no password)and wait for the pymail email list index to appearas isthis version loads the full text of all mails in the inbox on startupc:\pp \internet\emailpymail py password for pop secureserver net[pymail email clientconnecting '+ok ( '+ok '[ ' ' ' ' ' ' ' ' ' ' ' '] there are mail messages in bytes retrievi... |
5,521 | type command letters to process it the command lists (printsthe contents of given mail numberherewe just used it to list two emails we sent in the preceding sectionwith the smtpmail scriptand interactively pymail also lets us get command helpdelete messages (deletions actually occur at the server on exit from the progr... |
5,522 | startupthoughwe need to start pymail again to refetch mail from the server if we want to see the result of the mail we sent and the deletion we made hereour new mail shows up at the end as new number and the original mail assigned number in the prior session is gonec:\pp \internet\emailpymail py password for pop secure... |
5,523 | full name and address pairs in your email addresses this works just because the script employs email utilities described earlier to split up addresses and fully parse to allow commas as both separators and name characters the followingfor examplewould send to two and three recipientsrespectivelyusing mostly full addres... |
5,524 | will lead us to full-blown email clients and websites in later two design notes worth mentioning up frontfirstnone of the code in this package knows anything about the user interface it will be used in (consoleguiwebor otheror does anything about things like threadsit is just toolkit as we'll seeits clients are respons... |
5,525 | ""#################################################################################mailtools packageinterface to mail server transfersused by pymail pymailguiand pymailcgidoes loadssendsparsingcomposingand deletingwith part attachmentsencodings (of both the email and unicdode kind)etc the parserfetcherand sender classe... |
5,526 | ""##############################################################################common superclassesused to turn trace massages on/off ##############################################################################""class mailtooldef trace(selfmessage)print(messagesuperclass for all mail tools redef me to disable or log ... |
5,527 | (as we do for received mails in the mail fetcher ahead)but sending an invalid attachment is much more grievous than displaying one insteadthe send request fails entirely on errors finallythere is also new support for encoding non-ascii headers (both full headers and names of email addressesper client-selectable encodin... |
5,528 | linelen per mime standards from email encoders import encode_base encode_base (msgobjtext msgobj get_payload(if isinstance(textbytes)text text decode('ascii'what email does normallyleaves bytes bytes fails in email pkg on text gen payload is bytes in str in alpha decode to unicode str so text gen works lines [split int... |
5,529 | decoded addresses (possibly in full nameformat)client must parse to split these on delimitersor use multiline inputnote that smtp allows full nameformat in recipients ebcc addrs now used for send/envelopebut header is dropped eduplicate recipients removedelse will get > copies of mailcaveatno support for multipart/alte... |
5,530 | msg[name'join(valuerecip list(set(recip)fulltext msg as_string( ebcc gets mailno hdr add commas between cc eremove duplicates generate formatted msg sendmail call raises except if all tos failedor returns failed tos dict for any that failed self trace('sending to str(recip)self trace(fulltext[:self tracesize]smtp calls... |
5,531 | data open(filename'rb'msg mimetext(data read()_subtype=subtype_charset=fileencodedata close(elif maintype ='image'data open(filename'rb' euse fix for binaries msg mimeimagedata read()_subtype=subtype_encoder=fix_encode_base data close(elif maintype ='audio'data open(filename'rb'msg mimeaudiodata read()_subtype=subtype_... |
5,532 | not show-stopper def encodeheader(selfheadertextunicodeencoding='utf- ')"" eencode composed non-ascii message headers content per both email and unicode standardsaccording to an optional user setting or utf- header encode adds line breaks in header string automatically if needed""tryheadertext encode('ascii'excepttryhd... |
5,533 | no login required for this server/class def getpassword(self)pass no login required for this server/class ###############################################################################specialized subclasses ###############################################################################class mailsenderauth(mailsender)"... |
5,534 | the class defined in example - does the work of interfacing with pop email server--loadingdeletingand synchronizing this class merits few additional words of explanation general usage this module deals strictly in email textparsing email after it has been fetched is delegated to different module in the package moreover... |
5,535 | was the original requirement of email standards in principlewe could try to search for encoding information in message headers if it' presentby parsing mails partially ourselves we might then take per-message instead of per-session approach to decoding full textand associate an encoding type with each mail for later pr... |
5,536 | these tools are useful only to clients that retain the fetched email list as state information we'll use these in the pymailgui client in theredeletions use the safe interfaceand loads run the on-demand synchronization teston detection of synchronization errorsthe inbox index is automatically reloaded for nowsee exampl... |
5,537 | self trace('connecting 'self getpassword(server poplib pop (self popserverserver user(self popuserserver pass_(self poppasswordself trace(server getwelcome()return server fileguior console connect,login pop server pass is reserved word print returned greeting use setting in client' mailconfig on import search pathto ta... |
5,538 | text ['from(sender of unknown unicode format headers)'text +['''--sorrymailtools cannot decode this mail content!--'return text def downloadmessage(selfmsgnum)""load full raw text of one mail msggiven its pop relative msgnumcaller must parse content ""self trace('load str(msgnum)server self connect(tryrespmsglinesresps... |
5,539 | hdrlines self decodefulltext(hdrlinesallhdrs append('\njoin(hdrlines)finallyserver quit(assert len(allhdrs=len(allsizesself trace('load headers exit'return allhdrsallsizesfalse make sure unlock mbox def downloadallmessages(selfprogress=noneloadfrom= )""load full message text for all msgs from loadfrom ndespite any cach... |
5,540 | don' reconnect for each if progressprogress(ix+ len(msgnums)server dele(msgnumfinallychanges msgnumsreload server quit(def deletemessagessafely(selfmsgnumssynchheadersprogress=none)""delete multiple msgs off serverbut use top fetches to check for match on each msg' header part before deletingassumes the email server su... |
5,541 | pop to fetch headers textuse if inbox can change due to deletes in other clientor automatic action by email serverraises except if out of synchor error while talking to serverfor speedonly checks last in lastthis catches inbox deletesbut assumes server won' insert before last (true for incoming mails)check inbox size f... |
5,542 | msgid [line for line in split if line[: lower(='message-id:'if (msgid or msgid and (msgid !msgid )self trace('different message-id'return false try full hdr parse and common headers if msgid missing or trash tryheaders ('from''to''subject''date'tryheaders +('cc''return-path''received'msg mailparser(parseheaders(hdrtext... |
5,543 | example - implements the last major class in the mailtools package--given the (already decodedtext of an email messageits tools parse the mail' content into message objectwith headers and decoded parts this module is largely just wrapper around the standard library' email packagebut it adds convenience tools--finding t... |
5,544 | ""##############################################################################parsing and attachment extractanalysesave (see __init__ for docstest##############################################################################""import osmimetypessys import email parser import email header import email utils from email ... |
5,545 | if maintype ='multipart'multipart/*container continue elif fulltype ='message/rfc ' eskip message/rfc continue skip all message/tooelsefilenamecontype self partname(partixyield (filenamecontypepartdef partname(selfpartix)""extract filename and content type from message partfilenametries content-dispositionthen content-... |
5,546 | os mkdir(savedirfullname os path join(savedirpartname(contypecontentself findonepart(partnamemessageif not isinstance(contentbytes) eneed bytes for rb content '(no content)decode= returns bytesopen(fullname'wb'write(contentbut some payloads none return (contypefullname enot str(contentdef partslist(selfmessage)"""retur... |
5,547 | return payload def findmaintext(selfmessageasstr=true)""for text-oriented clientsreturn first text part' strfor the payload of simple messageor all parts of multipart messagelooks for text/plainthen text/htmlthen text/*before deducing that there is no text to displaythis is heuristicbut covers most simplemultipart/alte... |
5,548 | raw-unicode-escape and enc=nonebut returns single part with enc=none that is str instead of bytes in py if the entire header is unencoded (must handle mixed types here)see for more details/examplesthe following first attempt code was okay unless any encoded substringsor enc was returned as none (raised except which ret... |
5,549 | "" euse comma separator for multiple addrs in the uiand getaddresses to split correctly and allow for comma in the name parts of addressesused by pymailgui to split toccbcc as needed for user inputs and copied headersreturns empty list if field is emptyor any exception occurs""trypairs email utils getaddresses([field][... |
5,550 | the last file in the mailtools packageexample - lists the self-test code for the package this code is separate script filein order to allow for import search path manipulation--it emulates real clientwhich is assumed to have mailconfig py module in its own source directory (this module can vary per clientexample - pp \... |
5,551 | print(fetcher downloadmessage(num+ rstrip()'\ ''-'* last len(hdrs)- msgssizesloadedall fetcher downloadallmessages(statusloadfrom=last for msg in msgsprint(msg[: ]'\ ''-'* parser mailparser(for in [ ]try [ len(msgs)fulltext msgs[imessage parser parsemessage(fulltextctypemaintext parser findmaintext(messageprint('parsed... |
5,552 | more lines omitted print(maintextinput('press enter to exit'pause if clicked on windows --=============== ==-send exit loading headers connecting password for pp @learning-python com on pop secureserver netb'+ok ( ( ( ( ( ( ( load headers exit received(qmail invoked from network) may : : - receivedfrom unknown (helo pi... |
5,553 | as final email example in this and to give better use case for the mail tools module package of the preceding sectionsexample - provides an updated version of the pymail program we met earlier (example - it uses our mailtools package to access emailinstead of interfacing with python' email package directly compare its ... |
5,554 | if count chunk = input('[press enter key]'pause after each chunk def showmessage(imsglist)if < <len(msglist)fulltext fetchmessage(imessage parser parsemessage(fulltextctypemaintext parser findmaintext(messageprint('- print(maintext rstrip('\ 'main text partnot entire mail print('- and not any attachments after elseprin... |
5,555 | list if len(command= for in range( len(msglist)+ )showmessage(imsglistelseshowmessage(msgnum(command)msglistelif command[ =' 'save if len(command= for in range( len(msglist)+ )savemessage(imailfilemsglistelsesavemessage(msgnum(command)mailfilemsglistelif command[ =' 'mark for deletion later if len(command= needs list()... |
5,556 | if __name__ ='__main__'main(running the pymail console client this program is used interactivelythe same as the original in factthe output is nearly identicalso we won' go into further details here' quick look at this script in actionrun this on your own machine to see it firsthandc:\pp \internet\emailpymail py userpp ... |
5,557 | bytes from =>pp @learning-python com to =>pp @learning-python com date =>sat may : : - subject =>testing mailtools package [pymailaction(ildsmq? load connecting '+ok here is my source code [pymailaction(ildsmq? [pymailaction(ildsmq? fromlutz@rmi net topp @learning-python com subjtest pymail send type message textend wi... |
5,558 | =>fri may : : - subject =>among our weapons are these bytes from =>lutz@rmi net to =>pp @learning-python com date =>sat may : : - subject =>test pymail send [pymailaction(ildsmq? load connecting '+ok run awayrun away[pymailaction(ildsmq? run awayrun away[pymailaction(ildsmq? study pymail ' code for more insights as you... |
5,559 | but it' not at all complete more or less comprehensive list of python' internet-related modules appears at the start of the previous among other thingspython also includes client-side support libraries for internet newstelnethttpxml-rpcand other standard protocols most of these are analogous to modules we've already me... |
5,560 | show headersget message hdr+body for (idsubjin subjects[-showcount:if fetch all hdrs print('article % [% ](idsubj)if not listonly and input('=display?'in [' '' ']replynumtidlist connection head(idfor line in listfor prefix in showhdrsif line[:len(prefix)=prefixprint(line[: ]break if input('=show body?'in [' '' ']replyn... |
5,561 | python' standard library (the modules that are installed with the interpreteralso includes client-side support for http--the hypertext transfer protocol-- message structure and port standard used to transfer information on the world wide web in shortthis is the protocol that your web browser ( internet explorerfirefoxc... |
5,562 | reply close(for line in data[:showlines]print(linefile obj for data received show lines with eoln at end to savewrite data to file line already has \nbut bytes desired server names and filenames can be passed on the command line to override hardcoded defaults in the script you need to know something of the http protoco... |
5,563 | '\nb'<html xmlns=" '\nb'\nc:\pp \internet\otherhttp-getfile py www python org index html www python org index html error sending request bad request :\pp \internet\otherhttp-getfile py www rmi net /~lutz www rmi net /~lutz error sending request moved permanently :\pp \internet\otherhttp-getfile py www rmi net /~lutz/in... |
5,564 | '\nthis book has much more to say later about htmlcgi scriptsand the meaning of the http get request used in example - (along with postone of two way to format information sent to an http server)so we'll skip additional details here suffice it to saythoughthat we could use the http interfaces to write our own web brows... |
5,565 | this version works in almost the same way as the http client version we wrote firstbut it builds and submits an internet url address to get its work done (the constructed url is printed as the script' first output lineas we saw in the ftp section of this the urllib request function urlopen returns file-like object from... |
5,566 | one last mutationthe following urllib request downloader script uses the slightly higher-level urlretrieve interface in that module to automatically save the downloaded file or script output to local file on the client machine this interface is handy if we really mean to store the fetched data ( to mimic the ftp protoc... |
5,567 | '<!doctype html public "-// //dtd xhtml transitional//en" '\nb'\nb'<html xmlns=" '\nb'\nbecause this version uses urllib request interface that automatically saves the downloaded data in local fileit' similar to ftp downloads in spirit but this script must also somehow come up with local filename for storing the data y... |
5,568 | query parameters at the end for remote program invocation given script invocation url and no explicit output filenamethe script extracts the base filename in the middle by using first the standard urllib parse module to pull out the file pathand then os path split to strip off the directory path howeverthe resulting fi... |
5,569 | urllib parse unquote can undo these escapes if neededc:\pp \internet\otherpython import urllib parse urllib parse quote(' ++'' % % bagaindon' work too hard at understanding these last few commandswe will revisit urls and url escapes in while exploring server-side scripting in python will also explain there why the +res... |
5,570 | in deference to time and spacethoughwe won' go into further details on these and other client-side tools here if you are interested in using python to script clientsyou should take few minutes to become familiar with the list of internet tools documented in the python library reference manual all work on similar princi... |
5,571 | the pymailgui client "use the sourcelukethe preceding introduced python' client-side internet protocols tool set--the standard library modules available for emailftpnetwork newshttpand morefrom within python script this picks up where the last one left off and presents complete client-side example--pymailguia python pr... |
5,572 | guisnetworkingand python can take us like all python programsthis system is scriptable--once you've learned its general structureyou can easily change it to work as you likeby modifying its source code and like all python programsthis one is portable--you can run it on any system with python and network connectionwitho... |
5,573 | rudimentary parser for extracting plain text from html-based emails finallythe following are the new major modules coded in this which are specific to the pymailgui program in totalpymailgui itself consists of the ten modules in this and the preceding listsalong with handful of less prominent source files we'll see in ... |
5,574 | filessee the excel spreadsheet file linecounts xls in the media subdirectory of pymailguithis file is also used to test attachment sends and receivesand so appears near the end of the emails in file savedemail\version - if opened in the gui (we'll see how to open mail save files in momentwatch for the changes section a... |
5,575 | tools we've already seensuch as threads and tkinter guis like the pymail console-based program we wrote in pymailgui runs entirely on your local computer your email is fetched from and sent to remote mail servers over socketsbut the program and its user interface run locally as resultpymailgui is called an email client... |
5,576 | it is loadedadd some more code and buttons tired of seeing junk mailadd few lines of text processing code to the load function to filter spam these are just few examples the point is that because pymailgui is written in high-leveleasy-to-maintain scripting languagesuch customizations are relatively simpleand might even... |
5,577 | over sockets python threadsif installed in your python interpreterare put to work to avoid blocking during potentially overlappinglong-running mail operations we're also going to reuse the pyedit texteditor object we wrote in to view and compose messages and to pop up raw textattachmentsand sourcethe mail tools package... |
5,578 | modules reusedand additional lines of help textby comparisonversion by itself grew only by some to be , new program source lines as described earlier (plus , lines in related modulesand , lines of help textstatistically minded readersconsult file linecounts-prior-version xls in pymailgui' media subdirectory for line co... |
5,579 | here' summary of what' new this time aroundpython port the code was updated to run under python onlypython is no longer supported without code changes although some of the task of porting to python requires only minor coding changesother idiomatic implications are more far reaching python ' new unicode focusfor example... |
5,580 | minor changeaddresses entered in the user-selectable bcc header line of edit windows are included in the recipients list (the "envelope")but the bcc header line itself is no longer included in the message text sent otherwisebcc recipients might be seen by some email readers and clients (including pymailgui)which defeat... |
5,581 | python' webbrowser modulediscussed earlier in this bookto open browser the text help display is now redundantbut it is retained because the html display currently lacks its ability to open source file viewers thread callback queue speedup the global thread queue dispatches gui update callbacks much faster now--up to ti... |
5,582 | stillor should delete an email once in whilehtml main text extraction (prototypepymailgui is still somewhat plain-text biaseddespite the emergence of html emails in recent years when the main (or onlytext part of mail is htmlit is displayed in popped-up web browser in the prior versionthoughits html text was still disp... |
5,583 | list window width and height may now be configured in mailconfigduplicates are removed from the recipient address list in mailtools on sends to avoid sending anyone multiple copies of the same mail ( if an address appears in both to and cc)and other minor improvements which won' cover here look for " and " ein program ... |
5,584 | attachments composed headers when sending new mailsif header lines or the name component of an email address in address-related lines do not encode properly as ascii textwe first encode the header per email internationalization standard this is done per utf- by defaultbut mailconfig setting can request different encodi... |
5,585 | to parsingand to save and load full message text to save files users may set this variable to unicode encoding name string which works for their mailsencodings"latin- ""utf- "and "asciiare reasonable guesses for most emailsas email standards originally called for ascii (though "latin- was required to decode some old ma... |
5,586 | one for each active server transferand one for each active offline save file load or deletion pymailgui supports mail save filesautomatic saves of sent messagesconfigurable fonts and colorsviewing and adding attachmentsmain message text extractionplain text conversion for htmland much more to make this case study easie... |
5,587 | pymailgui' list windowssuch as the one in figure - display mail header details in fixed-width columnsup to maximum size mails with attachments are prefixed with "*in mail index list windowsand fonts and colors in pymailgui windows like this one can be customized by the user in the mailconfig configuration file you can'... |
5,588 | an html rendition of this text in spawned web browser is also availablebut simple text is sufficient for many people' tastes +the cancel button makes this nonmodal ( nonblockingwindow go away more interestinglythe source button pops up pyedit text editor viewer windows for all the source files of pymailgui' implementat... |
5,589 | and currently lacks the source-file opening button of the text display version (one reason you may wish to display the text viewertoohtml help is captured in figure - when message is selected for viewing in the mail list window by mouse click and view presspymailgui downloads its full text (if it has not yet been downl... |
5,590 | the bulk of this window (its entire lower portionis just another reuse of the texteditor class object of the pyedit program we wrote in --pymailgui simply attaches an instance of texteditor to every view and compose window in order to get full-featured text editor component for free in factmuch on the window shown in f... |
5,591 | source-code viewing (we saw the latter in figure - for mail view componentspymailgui customizes pyedit text fonts and colors per its own configuration modulefor pop upsuser preferences in local textconfig module are applied to display emailpymailgui inserts its text into an attached texteditor objectto compose emailpym... |
5,592 | account parameters from the mailconfig module listed later in this so be sure to change this file to reflect your email account parameters ( server names and usernamesif you wish to use pymailgui to read your own email unless you can guess the book' email account passwordthe presets in this file won' work for you the a... |
5,593 | also notice that the local file password option requires you to store your password unencrypted in file on the local client computer this is convenient (you don' need to retype password every time you check email)but it is not generally good idea on machine you share with othersof courseleave this setting blank in mail... |
5,594 | figure - nonblocking progress indicatorview gui itself--the gui responds to movesredrawsand resizes during the transfers other transfers such as mail deletes must run all by themselves and disable other transfers until they are finisheddeletes update the inbox and internal caches too radically to support other parallel... |
5,595 | on nearly every platformthoughlong-running tasks like mail fetches and sends are spawned off as parallel threadsso that the gui remains active during the transfer--it continues updating itself and responding to new user requestswhile transfers occur in the background while that' true of threading in most guishere are t... |
5,596 | overlap broadlybut deletions and mail header fetches cannot in additionsome potentially long-running save-mail operations are threaded to avoid blocking the guiand this edition uses set object to prevent fetch threads for requests that include message whose fetch is in progress in order to avoid redundant work (see the... |
5,597 | delete it entries in the main list show just enough to give the user an idea of what the message contains--each entry gives the concatenation of portions of the message' subjectfromdatetoand other header linesseparated by characters and prefixed with the message' pop number ( there are emails in this listcolumns are al... |
5,598 | to view saved emails laterselect the open action at the bottom of any list window and pick your save file in the selection dialog new mail index list window appears for the save file and it is filled with your saved messages eventually--there may be slight delay for large save filesbecause of the work involved pymailgu... |
5,599 | for exampleview opens the selected message in normal mail view window identical to that in figure - but the mail originates from the local file similarlydelete removes the message from the save fileinstead of from the server' inbox deletions from save-mail files are also run in threadto avoid blocking the rest of the g... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.