hpi-swa-teaching / imapclient Goto Github PK
View Code? Open in Web Editor NEWThis project provides a library and tool set to access email through IMAP in the Squeak/Smalltalk environment. (SWT22-13)
License: MIT License
This project provides a library and tool set to access email through IMAP in the Squeak/Smalltalk environment. (SWT22-13)
License: MIT License
The develop
branch is missing:
.travis.yml
and .smalltalk.ston
. How do you even Travis-CI?LICENSE
. It is morally questionable to remove the License.README
. The MIT license (The license the original Client is under) requires stating the original authors. Removing the README amounts to license violation.Just reverting the files should fix these issues.
Currently its just an empty ICFolder with several nil-children.
The clients fetchheaders function works, but then fails to parse/render them into the UI.
ICEndpoint owns methods to check the responses. These could also be used by other objects. Maybe it is a good idea to encapsulate these in a Response class?
For example a user wants to fetch mail with a messageId which not exists, what should fetchHeader do?
Within my latest commit we implemented our new class ICFolder
.
We need to find some useful ways to test this new class.
I already wrote a test scenario when adding new folders in the hierarchy.
The IMAP protocol includes flags for \Answered \Flagged \Deleted \Draft \Seen.
We should be able to incorporate functionality for flagged, draft and seen. Flags for \Answered may be difficult without SMTP. Also we shouldn't care about flags for deletion, since we put deleted emails simply in the "trash-folder" (but this should be done in a different issue).
TestCase method not used properly
for example:
[self assert: (self endPoint ping)] on: Exception do: [ ^ self ]. self fail
self should: (self endPoint ping) raise: Exception
self assert: (self endPoint logout) = true.
self assert: (self endPoint logout) equals: true
or even better: self assert: (self endPoint logout).
Check whether the framework recognizes a sudden connection loss. If this is not the case, implement a feature to handle this behavior.
A User who checks his mails on a regular basis, wont fill in his credentials every time. So I implemented the save credentials check box. Its just creating an config.txt in the Resources Directory, where the credentials are stored in plaintext. This is far away from being good. If i hand my squeak image to a friend, i would also give him my password in plain text.
Many mails are encoded with quoted printable. https://de.wikipedia.org/wiki/Quoted-Printable-Kodierung
.We should convert it into normal ASCII before trying to parse it. We can recognize it with: Content-Transfer-Encoding: quoted-printable
Take the notes from the first meeting and turn it into user stories.
Find an scoring system and score the user stories.
The message checks if the username and passwort differs from the default values.
If the default values are not valid values, the name default value is a little bit misleading?
Furthermore if a server has these default values as user credentials, they can not be used, because they are incorrectly recognised as "inValid".
In my opinion these message is not necessary and can be deleted
Do not display: Tasks, Notes, Outbox, Journal, Check, Info, Items, Contacts
Currently a dynamic message id is stored in an email object. The message ids are enumerated beginning from 1 on the server. If a email is removed out of our system from the server, the stored message ids may not be up to date.
This could be fixed by a server wide global message id or by fetching the message ids every time before they are used.
Sobald der Inhalt einer Email geöffnet wird, wird die Email als gelesen markiert.
Die Schrift von Betreff, Absender und Datum einer ungelesenen Email wird fett markiert.
Eine gelesene Email wird nicht fett markiert.
In SWA we learned (from @krono) that constants should be implemented on instance side of classes.
In @Hannes01071995 and my opinion this does not make much sense. Since constants should be constant for every instance of a class this should be on class side.
Please state your opinion.
Deleting messages in IMAP is a bit tricky, as there is no explicit delete command. Instead, a flag is set on the message marking it as deleted. This, by itself, does nothing to get the message removed. Just when a special command is called all messages in the current folder marked as to be deleted are removed.
. UID SEARCH ALL
The above is executed in a folder containing just a single message (see the result of the UID SEARCH ALL). The flag \Deleted is then added to flag list of the message (UID STORE 1814 +FLAGS (\Deleted)). The STORE command returns the new flag list. The EXPUNGE command then removes the message.
In particular ICEndpoint>>initalize
At the moment we assume, that all email-IDs in the range are assigned
At the moment a error is thrown if the connect fails otherwise it returns true.
For me it is a little bit confusing. Either the return value should be checked to indicate failure or the failure is indicated through an exception. As far as I know currently no message (for example UI) checks the return value, so it should be enough to check for exceptions?
The message noopCommand on class site of ICEndpoint still uses ICStringFormatter
If I understand the command in Slack correctly the getter for a boolean variable should be named in the form is{instancevariable}. Is it then necessary to have an other getter?
Currently, the framework does not time out if fetchNextResponse does not deliver a response.
Window opens on error: "ConnectionTimedOut: Data receive timed out"
testLogout_EverythingFine calls testConnectToOnAndLoginUsing_EverythingFine
There are some too long message lines. These can be found with "SwaLint Code Critics"
After clicking login in the ICLoginDialog a ugly, not helpful Error message appears.
It would be better to catch the case of empty text fields when clicking login button.
Maybe we should collect here different types of mails, which cant be parsed atm:
So i wanted to open an amazon mail, which fails in the parseFetchBody Method within the Function asTextFromHtml. So there are 2 issues at the moment. The Amazon Mail contains two Content-Types.
Content-Type: text/plain; charset=utf-8
and Content-Type: text/html; charset=utf-8
. I think as long as we are not able to display css with html properly (we should think about using an squeak web browser?). We should always go for the Content-Type: text/plain; charset=utf-8
. Often Emails are sent with both Content-Types for devices not capable of displaying HTML.
At the Moment our parseFetchBody
method is just
((self lastResponse copyFrom: 2 to: (self lastResponse size - 1)) joinSeparatedBy: Character cr) asTextFromHtml
Instead of taking everything from 2 to last -1 index, we have to parse the body, looking for content-types and only render the specific content-type.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.