-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mail/Msg refactoring #173
Mail/Msg refactoring #173
Conversation
Adding a main structure which can be used for *everything* which has to do with a mail: - Writing a new mail - Fetching the information of a mail
User can write mails now
When mail is converted to a sendable message, it'll print out a nice little error message what to do and which field is missing a value.
Started implementation for forwarding message
This is just a "backup" commit
Himalaya can compile successfully now.
- Moved everything from msg/mail to msg/model - Removed uneccessary files
Changed the datatype from Vec<Flag<'static>> to HashSet<Flag<'static>>, because each Message/Mail can include only one flag-type, so why not a HashSet for this job?
Fixed the lettre-dependencie which points to the pull request with the given serde implementation for ContentType (needed for Attachments).
- Removed the msg/flag/flag.rs file since we can use the imap::types::Flag implementation now - `himalaya template new` printed the template two times. This should be fixed now
Fixed formatting when printing out template
Fixed bug that user can't send a mail
- Fixed bug that listing didn't showed up addresses in the `From:` field for example - Made each `from` trait function to `try_from` for better error-handling
- Updated mailparse to 0.13.4 - Added new "new" function to Account - Cleaned up some functions (removed some) - Added Eq and PartialEq derives for msg - Bugfix: It couldn't get the body of some mails, because they were inside a multipart/alternative part. Now the mail is iterating through all subparts and picks up the firs text/plain "attachment" and uses it as the body.
- Made the "main attributes" of the Msg struct public - Removed to getter functions
- Added documentation - Removed the getter functions, beacuse the attributes are public
- Removed the `new` constructor of the envelope, since it's actually the same as Envelope::default() - Addded tests and Documentation to Attachments.rs
- Added docuemntation for msg/body.rs - Fixed some syntax errors in the doc strings
- Added `get_raw` function and `raw` field for the `Msg` struct. - Fixed raw output of msg - Started documentation + tests for the Msg struct
- Added Clone derive - Added documentation for change_to_reply method - Added tests to change_to_reply method
- Changed `Account::new()` function - Added more documentation to Msg struct - Added more tests to Msg struct
So this PR should be ready to merge now 👍 |
Eh, what are you waiting for? Are you doing a review at the moment? Are you unhappy with something? (Just wondering) |
Great, I will review and test the branch one last time, so we don't miss sth. |
Just sleeping... |
Oh sorry 😅 |
Are you still reviewing? |
Yes, it's a big PR, I want to take time to test it well. I'm quite busy at work those days, I will finish it as soon as I can. |
Ok, I was just wondering because about five days passed now. Take your time! I don't want to put you under pressure! |
I opened 4 issues on your repo https://github.com/TornaxO7/himalaya/issues. |
Changes the order of the signature for forwarded messages.
Changed the output if an error occurs.
…e_with_plain_format
…plate_shows_raw_data_with_json_format
When printing the message in json, the raw message is printed out as a string now.
- When displaying the table, we'll look first, if a name exists, if yes => use it otherwise use the email address. - Added the rfc2047_decoder for parsing addresses
…n_format Template shows raw data with json format
Run 'cargo fmt'
…erly_in_table_and_json
If all tests pass, I'm ready to merge! |
What the? Why are the tests failing again? They are working locally on my machine ._. |
Wait, it's still testing? o.O Nevermind my previous message 😅 |
Yehaaaw! Tests passed! |
Congratulations 🎉 and thank you for your patience! |
Thanks and thank you for accepting my PR :) |
Hi! I did some changes to the
Msg
struct. You should be able now to use it for everything which is related to Msgs/Mails. This means:and so on.
I'd really appreaciate it, if this could be merged, because the "new"
Msg
struct will be able to store all related information of a Msg which should make it easier for the TUI to display them.Hint
It's not completely done yet. You can see below in the
TODO
section what is missing, but the rest should work.TODO