I have wrote an addressbook functionality for pontomail.

Adressbook entries are stored in the database and are sortable. When you add a new entry, the code validates email address, and checks if email or nickname is already in the addressbook. First, last names and additional info are optional.

You can select multiple entries in the addressbook and click on E-Mail button. Then you are transferred to compose mail page with selected emails in the To: field.

Autocompletion function checks addressbook and if the entry is found it shows an email with "+" appended to the email.

In the view message page if you don't have senders email in your addressbook, a button "Add to Addressbook" is displayed.

Additional fixes in the patch:
1) In the view message page the code checks if senders email matches any drupal user's email. It the match is found and user pictures are enabled, sender's atavar is displayed.
2) If "Mail" menu is disabled the mail servers are not shown in menu either. This is useful if somebody wants to use just Mail block, but not menus.
3) Changed all titles like "Compose", "Mail" and others to lowercase to follow drupal convention.

CommentFileSizeAuthor
patch_tar.gz6.13 KBmiglius

Comments

sanduhrs’s picture

Wouldn't that be worth a seperate module?

miglius’s picture

Why?

It is supposed to be used together with pontomai.module (add addressbook entries) and pontomail_sendmail.module (send emails to persons in addresbook). Doubt if just stand alone addressbook would be very useful.

However the pontomail author and community should decide that.

sanduhrs’s picture

A standalone addressbook would then be useful, if users could enter additional information, like:
- first name
- last name
- phone number
- fax number
- company
- address
- postcode
- homepage
- birthday
and so on, perhaps letting users define custom fileds and using taxonomy to categorize the contacts entered.
Having reminders when birthdays are near and letting assign people to events would also be great.

None the less it could interact with pontomail and provide all the features you already described - if pontomail is installed.

miglius’s picture

Title: Addressbook » Taxonomy

Not sure about integration of addressbook with other parts of drupal like events or taxonomy. Addressbook entries are not nodes - they are not shared between users or groups because they store personal information. Taxonomy, on the other hand, is build to categorize nodes. Same aplies to the events. Assigning people from addressbook to events would mean that other people can browse the event end see personal information stored in addressbook.

miglius’s picture

Title: Taxonomy » Addressbook
sanduhrs’s picture

So, making addressbook entries nodes, would result in a global addressbook.
Which is nice to have in some cases, think of a company's intranet sharing a customer addressbook.
In addition it would be possible to integrate with OrganicGroups to have a per-group-addressbook.

Assigning people to events could simply result in displaying their names next to the event for people who are not allowed to browse the addressbook - I don't think that would be too much of a "protection of data privacy"-issue. But this could also be regulated by a seperate module.

However, an more generic addressbook, not only restricted to be used with pontomail would be very valuable - just think of some kind of groupware setup with drupal.

geodaniel’s picture

I think it could make sense to make this as a standalone module that ties in heavily with pontomail if it's installed. If a jabber module is there, then presence information could be included. If the LDAP integration module is there, extra fields could be pulled in from there. Etc, etc. And contacts as nodes would make sense if they were node_access enabled so that only the creator could view them. Once it is relying on node_access, then this could be expanded by other node_access modules if desired so that shared address book spaces could be created.

I'm curious about how this could tie in with the buddylist module and relationships between users in Drupal...

boris mann’s picture

There are already existing modules that apply -- eg. LDAP address book -- http://drupal.org/node/16037

An address book should look at in-Drupal users (i.e. user accounts + profiles) as well as potentially LDAP and defined non-Drupal users that potentially might be nodes.

I agree that it should be a separate module that can integrate with Pontomail if it is installed.

Souvent22’s picture

Yes. Agreed. Give me a couple days to take it out of core, and have a look at the other modules, and how to integrate them in......
Unless someone was to submit a patch to do that sooner than me? :). hehe

sanduhrs’s picture

sun’s picture

Title: Addressbook » Addressbook / personal data

E-Commerce already delivers a addressbook module, too. With that a user is able to create more than one address (for itself of course).
Also think of Location module that assigns coordinates to an address.
And then have a look at CiviCRM that rather implements a third party solution to get personal data into Drupal.
And, yes, there is a Addressbook module already, but after a short look you'll see that it is not written very well...

Sigh..., you can also look at Contact Directory module (that provides addressbooks for users), roundcube integration module (that already leverages data from CiviCRM), CiviNode (that needs CiviCRM), Business Card (that looks promising) and last but not least Postal (that provides generic address data as field for CCK).

Yeh! Forgot to mention vCard module (that exports personal data) and we should also bear in mind that we can pre-fill user location data with IP to Country module.

IMHO we soon need a one-for-all solution that handles generic addresses/personal data in a Drupal system:

  • addresses/personal data of a user (e.g. for E-Commerce)
  • addresses/personal data of contacts of/for a user (e.g. for Pontomail)
  • addresses/personal data of existing users that are contacts of a user
  • 'public' addresses for all or certain users (e.g. for company addressbooks)
  • import and export of address data for user's usage (e.g. to sync with offline applications)
  • address/personal data API for any other module (e.g. Pontomail)
  • providing a complete address fieldset for CCK node types
  • supporting any DIN and international notation standard available
  • providing LDAP and other synchronisation APIs

So why not do a merger of all existing modules?

Damn! Bookmarking this research for later...

jonhattan’s picture

Title: Addressbook / personal data » also there is a LDAP Addressbook module

For the sake of completion, there's already a LDAP Addressbook module:
http://drupal.org/project/ldap_addressbook

the module is outdated, but in the issue queue there is a very interesting update to 5.2 with some new features:
http://drupal.org/node/167521

any one working on the big proposal of having an addressbook based on drupal users, nodes and external sources (ldap) entries?

any one knows a solution to have per OrganicGroups addressbook?

jonhattan’s picture

Title: also there is a LDAP Addressbook module » addressbook for pontomail & general discussion on addressbook with drupal

I'm very sorry, I changed the title of the issue.
Just posting to change it to one that makes more sense.