Commit Graph

37 Commits

Author SHA1 Message Date
Augustin Cavalier 95c9effd68 Migrate the BMailComponent docs to the Haiku Book.
I've updated the docs to match the current BMailComponent, documented
new functions, and cleaned up the MailComponent.h file to at least
somewhat match our coding style.

First in a series (there are 3 more old API docs on the Mail Kit in that
"Public API" folder.)
2017-12-25 19:43:51 -05:00
Axel Dörfler d8c022250d BMailAccountSettings: use BPathFinder.
* This allows to put add-ons in non-packaged folders, too.
* Also, Set{In|Out}boundAddOn() only ever looked in the system dir.
2015-11-07 20:55:14 +01:00
Axel Dörfler 7bdee8beab BEmailMessage: added missing const, Date() returns time_t.
* Added missing const to some getter methods.
* Date() now tries to parse the date of the mail, and return it as
  a time_t; you can still retrieve the actual string via
  HeaderField("Date") if you have to.
* Mail now shows the time in the local time zone, and with the
  current locale.
2015-09-04 17:33:17 +02:00
Axel Dörfler 66078c7911 BMailComponent: made a few methods const. 2015-09-04 17:33:12 +02:00
Axel Dörfler 4a8448ce34 Major coding style cleanup. 2015-01-06 15:23:33 +01:00
Axel Dörfler f90a3bbd67 Added support for letting user mail add-ons override system ones.
* The path will now be relativized before storing it.
* On load, the add-on will be tried to load from the user, then common
  and finally system add-on directory.
2015-01-06 15:22:37 +01:00
Axel Dörfler 1f87386b0a Now also loads mail settings from common.
* Also removed the superfluous and unused timeout argument from Save().
2015-01-06 15:22:28 +01:00
Axel Dörfler bcf60bbb83 Fixed Mail build.
* The former kMsgBodyFetched (now B_MAIL_BODY_FETCHED, following the other
  message constant names in AppDefs.h) must be public.
2015-01-06 15:22:18 +01:00
Axel Dörfler 146357b547 Completed transition to the new mail API; ie. it compiles.
* Completely untested yet. Unlikely to work yet.
2015-01-06 15:21:55 +01:00
Axel Dörfler 715bf3d17a Work in progress of mail rework.
* Not everything compiles; all protocols, and inbound filters do, though.
* Renamed a few classes to give a better idea what they are for; prefixed
  public classes with the 'B' prefix.
* Moved ProtocolConfigView's classes into the BPrivate namespace.
* Moved BMailFilter into its own file.
* Added BMailFilter::DescriptiveName(). This is now used by the RuleFilter
  in order to give a description of what it's doing (ie. no more dozens of
  "Rule filter" entries in the preferences).
* Removed no longer used MailAddon.h.
* Renamed Addon to AddOn where found, since that is more consistent with the
  rest of the API.
* Merged the former MailProtocol with the former MailProtocolThread; the
  differentiation between those two was pretty messy.
* All configuration views touched so far are now using the layout kit.
* The RuleFilter is currently broken functionality wise; I have not yet decided
  how to solve the stuff it uses (TriggerFileMove() does not exist anymore,
  for example).
* BMailAddOnSettings (formerly known as AddonSettings) now directly subclass
  BMessage; there are no Settings() and EditSettings() method anymore. The
  class uses a copy of itself to determine whether or not it has been changed.
* Lots of cleanup.
2015-01-06 15:21:36 +01:00
Adrien Destugues 4ec6c3a042 Merge patch by plfiorini :
Some changes to the API for notifications.
	* Don't go through be_roster to send a notification, but use Notification->Send() instead.
	* Rename App to Group to make the purpose clearer

And some changes to the notification code itself:
	* Use the Notification class as the way to convey informations about a notification. Allows easier extension of this class
	* Code cleanup
	* Use of the layout kit for the notify window

Unfortunately, the latter part clashes quite a bit with the changes I already did to the notification window, so it's now quite broken. Working on that next, but I wanted to separate that work from the patch ...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-02 14:57:43 +00:00
François Revol e039afe87e Define B_MAIL_DAEMON_SIGNATURE and use it instead of hardcoding the signature everywhere.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-29 16:21:17 +00:00
Axel Dörfler 21c22141b8 * Removed default_sent_directory(), and introduced
default_mail{_in|_out}_directory() methods in the BPrivate namespace.
* Used these methods in the inbound/outbound protocols.
* Moved WriteMessageFile() into the BPrivate namespace as well, and put its
  prototype into a new header MailPrivate.h along with the new directory
  getters.
* Removed the automatic copy to the sent directory again, and only have one
  directory for incoming mail. Incidentally, this fixed #7509, although the
  underlying filter restriction remains.
* Automatic whitespace cleanups, some style cleanups. Sorry for the mess.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-19 22:11:04 +00:00
Stefano Ceccherini ab33d547d2 Fix build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-05 20:16:48 +00:00
Scott McCreary b676e13c3b Readded function declarations that were removed in r40397. These are needed for building Pe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-05 19:41:52 +00:00
Jonas Sundström 1ea9f437ea Fix for #7372. Don't use an uninitialized buffer. Some BString replacement of C strings. Replace Mail's ReadAttrString() function with the BNode method. Define a B_MAIL_ATTR_BCC.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-04-01 06:18:49 +00:00
Clemens Zeidler 08606d49da Add settings to enable and disable in and outgoing mail accounts.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-22 10:28:22 +00:00
Clemens Zeidler a64bd5649d Write MAIL:name, MAIL:thread and MAIL:account attribute. The account id is now stored in MAIL:account_id. This requires to re-download all mails to write the correct attribute (sorry).
Fixes #7375.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-21 09:13:12 +00:00
Clemens Zeidler 495ecdfea8 Do not recreate the account file when saving the settings. This fix
alternating account names (once AccountName_1 the other time just 
AccountName).
Sort accounts by creation time. This fix the order in mail
preferences.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-17 00:45:30 +00:00
Clemens Zeidler b8d2bbd616 - Partial downloaded messages are now opened by Mail and not by the mail daemon. Mail request the body fetch and get notified when the daemon is done. During this time the Mail window title is showing "Downloading: subject". This fixes #7256.
- Some cleanup in Mail.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-03 09:05:04 +00:00
Clemens Zeidler 379df1cc3c Move #define from E-mail.h to mail_util.h. Thx Jerome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-21 23:16:08 +00:00
Clemens Zeidler d773c5bf4c If not in "mark automatically as read" mode mark the mail as seen. Fix selection of this option in the preference window. Fix some read/unread bugs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-21 09:52:41 +00:00
Clemens Zeidler 9967dfd924 - Extend MarkMailAsRead to take a flag not only a bool value. Write an additional MAIL:read attribute.
- Remove some hard coded paths.
- Catch failure of FindMessage correctly. Thanks Axel.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-21 07:24:29 +00:00
Clemens Zeidler 0e657c0b6c Remember tracker message when downloading a partial message and open it with Mail. This is needed to get the next/previous message after downloading the body.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-20 07:55:47 +00:00
Clemens Zeidler 7ab6cb9ac5 Copy sent mails to /boot/home/mail/sent. Hope that makes more clear if a mail should be send (in out folder) or already has be sent.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-20 03:54:28 +00:00
Clemens Zeidler df0ad9c12a Fix account name in mail.
Work in progress: fetch next partial downloaded message.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-15 02:19:49 +00:00
Clemens Zeidler 1af4fa4ba6 Major restructuring of the mail server:
Accounts are now stored in a separate file. Previously they where somehow magically assembled from the chain ids. Now its possible to remove a account temporary by removing the account file form the account folder.

Each account could have an inbound protocol, an outbound protocol and some filters.

Mails are now associated with an account and not with a chain. This required to replace the chain id attribute by an account attribute.

Replace BMailFilter and BMailChain by a less general approach. Basically the chain had a list of filters and call the ProcessMailMessage for each filter. This made it sometime difficult to understand what is going on, e.g. sometimes a filter used information gathered by another filters. The new MailProtocol and MailFilter classes are calling more dedicated hook functions, e.g. HeaderFetched or MessageReadyToSend.

As before all MailProtocol's (plus their filters) are running in their own thread.

Cleaned up the error and status window a bit. Abstracted the interface to these windows. Should be easy to write a BNotification api back-end now.

Parsing of mail headers is much faster now. Fetching the headers of a large mailbox takes ~min and not ~hour now! Initial checkout time is in the same order like Opera. The problem was the massive use of fgets in parse_header (mail_util.cpp) now the complete header is read in one go. Furthermore, only interesting fields are extracted.

Remove some unused files, BeOS relicts... Feel free to translate the mail server and remove the own language system (headers/private/mail/MDRLanguage.h).

Sorry for the remaining old (and new) coding style issues, sometime just ignore them, to many :(



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 01:49:01 +00:00
Stefano Ceccherini 2aef272550 Change Path() to GetPath(), and made it accept a reference instead of
a pointer. Style changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 03:57:58 +00:00
Stefano Ceccherini 2d05ca4e7a Actually return B_NO_MEMORY in case of error (was a regression introduced
in r38247.
Small style fixes (more to come)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 20:03:07 +00:00
Stefano Ceccherini d3485a2648 Renamed some members to fit our guidelines
(and to make the code more readable)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 19:57:53 +00:00
Stephan Aßmus 9d19a1c8e0 Rewrote header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 12:41:25 +00:00
Jérôme Duval f2e230ca88 fix a bit of gcc4 build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 22:35:52 +00:00
Axel Dörfler f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +00:00
shatty 0ba6d601e8 restore prior values for utf8 and null, for the sake of default send mail encoding settings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9981 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-17 01:56:18 +00:00
Nathan Whitehorn 5344cdf47b Made encoding detection actually work. Added a deprecation notice in E-mail.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-11 23:17:48 +00:00
Nathan Whitehorn fa84ff9eb1 Forgot some files in the MDR import.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9017 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-20 22:34:03 +00:00
shatty bdde99f147 missing 'til now...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-16 21:00:08 +00:00