This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.

Confluence Mail Utilities Plugin

Name Confluence Mail Utilities
Version 1.2
Product Versions 1.2 Tested with Confluence 2.8.0, Confluence 2.4.5
1.1 Tested with Confluence 2.8.0, Confluence 2.4.5
1.0 Tested with Confluence 2.3.3, Confluence 2.4.5
Author(s) SIM Hua Soon
Homepage http://confluence.atlassian.com/display/CODEGEIST/Confluence+Mail+Plugin
Price Free
License BSD
JavaDocs N/A
IssueTracking http://developer.atlassian.com/jira/browse/CMUP
Download JAR ConfMail-1.2.jar
Download Source https://svn.atlassian.com/svn/public/contrib/confluence/ConfMail

Description/Features

This is a set of utilities to facilitate users to contribute content to Confluence via emails.
The Confluence Mail Utilities will process all the incoming emails into the configured space and redirect it to the correct location based on the extra information added at the end of the subject line.

It removes the hassle of setting up multiple email accounts for different spaces by using an unified email account (for e.g confluence@mycompany.com). Spaces will be equipped with email archival capability once the space is created without the extra administration effort to apply for email account and space configuration.

This will also encourage people to contribute information into Confluence without additional steps to copy and paste the information from their emails to Confluence.

Setup

1. You will need to create an email account for users to send their emails to.

2. You will need select a space to hold this email account. This space will be used to hold those emails that cannot be redirected.

3. You can setup the mail account in the space according to the instruction in Adding a Mail Account

For more details on email archiving on Confluence, you can refer to Confluence User Guide

Usage

Archiving as email to other space

During our course of work, emails is one of the most frequently medium of information exchange. Important emails such as approvals, meeting notes, agreements, discussions leading to decisions should be archived for subsequent references in future.

To archive the email in a space other than the default space, you can add the spacekey enclosed with braces at the end of the subject line.

Converting emails to a blogpost

Emails are also used to deliver announcement of key events. This events can be blogged down in Confluence as well with the Confluence Mail Utilities.

1. To convert an email to a blogpost, you can add the a tag in the format {spacekey:news} to the end of the subject line.

1. All HTML and Rich-text email will be converted to plain-text format. Wiki syntax is allowed for formatting and attachments are allowed.

2. For the ease of reading, the prefix such as RE: or FWD: and suffix such as {DOC:news} will be removed as well.

3. The blogPost will be created with the email id of the sender. Therefore the email id must be same as the Confluence user id. Since it is possible to masquerade email sender, a line "Delivered via Confluence Mail" will be appended at the end of the blogpost to indicate that the blogPost is not authenticated. Users can subsequently edit the blogpost to remove the extra line after verification.

4. In event of any errors (ie. that a duplicate title within the same space or user does not exist), it will be stored as a normal email archive in the space as determined by the spacekey. If a space cannot be found with the spacekey, it will be stored in the space being selected in the Setup section.

 


Examples

Archiving as emails to other space

To send the email with the following subject line

Hello world

to the Confluence Extension Space with the spacekey (CONFEXT), you can add {CONFEXT} behind the subject line to

Hello world {CONFEXT}
The spacekey is the word between the display and the title of the pages for most url. For example, DOC is the spacekey for the following url: http://confluence.atlassian.com/display/DOCAdding+a+Mail+Account

Converting emails to a blogpost

To convert an email to a blogpost in the CONFEXT space, change the subject line from

Hello world

to

Hello world {CONFEXT:news}

Version History

Version Feature
1.0 Redirect emails to different spaces
1.1 Convert emails to blogpost
1.2 Supports email addresses as id and reply to email if there is any errors

Version History

Version Date State License Price
Show description 1.2 (#2) 02 Aug 2008 Stable Freeware / Open Source (BSD) Donate

Release Notes
The initial public release.

Contributors

Show description 1.1 (#1) 09 May 2008 Stable Freeware / Open Source (BSD) Donate

Release Notes
The initial public release.

Contributors

Outstanding Issues

Download Stats

class com.thoughtworks.xstream.alias.CannotResolveClassException: org.jfree.data.time.DateRange : org.jfree.data.time.DateRange

Screenshots



Labels

codegeist_2008_confluence codegeist_2008_confluence Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. May 13, 2008

    Boots Wang [atlassian] says:

    I have so many users asking for this functionality. Great plugin!

    I have so many users asking for this functionality. Great plugin!

  2. May 16, 2008

    Bob Swift says:

    Good idea since some of our spaces don't have email accounts associated with the...

    Good idea since some of our spaces don't have email accounts associated with them and occasionally have need to send email. The mail forwarding did work but I was not able to get a news item created by adding :news. Instead, all I got was the email in the correct space with the tag still on the subject line.

    mail to news test {systems:news}
    

    It seems that you could extend this to support :page as well to create a page from an email.

    1. May 17, 2008

      huasoon says:

      I just tested version 1.1 on a 2.4.5 installation. It is working well. So I pres...

      I just tested version 1.1 on a 2.4.5 installation. It is working well. So I presume that it should be compatible from 2.4.5 onwards.

      Is *systems* a valid spacekey in your confluence installation? And what is your version of Confluence?

      Thanks. This is a possibility but handling pages will be much more complicated. I have logged down your request with [jira|http://developer.atlassian.com/jira/browse/CMUP-1]

      I will continue on with comments from email notification first.

      1. Jun 06

        Stefano Gevinti says:

        I tested version 1.1 on 2.7.3 installation and I have the same Bob's problem. It...

        I tested version 1.1 on 2.7.3 installation and I have the same Bob's problem. It worked correctly the delivery of email to the Space but no news has been created from the email by adding postfix :news. What's wrong in your opinion?

        1. Jun 06

          huasoon says:

          Hi Stefano, thanks for the feedback. Firstly, i need to verify whether your ema...

          Hi Stefano, thanks for the feedback.

          Firstly, i need to verify whether your email subject is correctly named.

          For example, if your subject title is Fwd: Testing blogging {DS:news}

          then you should be able to access

          http://confluence-hostname/display/DS/

          Secondly, there is a likelihood the user is not an authorized users in confluence. Is your email id same as your confluence id? My design was based on the assumption that confluence and the mail server are both tied to the corporate LDAP.

          For example, if your id is gevinti@company.com, then your confluence id should be gevinti in order for the validation and permission checking to pass through.

          If these are not the 2 reasons, I will appreciate if you can send me a sample email you tried together with the link of the space that you are sending to.

          I have added a jira request in email reply in the next release to alert the users of any failure in validation or other possible errors. This will help the users in identifying the root cause.

          Thanks.

          1. Jun 10

            Stefano Gevinti says:

            Hello. The email subject is correctly named. The problem probably is the useri...

            Hello.

            The email subject is correctly named.

            The problem probably is the userid. In fact my email is gevinti@company.com and my confluence userid is, again, gevinti@company.com and not gevinti. Do you confirm this is the problem?

            Very good to add an email reply if something goes wrong.

            Stefano.

            1. Jun 10

              huasoon says:

              yes, that is the problem The macro will use the @ symbol to filter off the doma...

              yes, that is the problem
              The macro will use the @ symbol to filter off the domain name.

              Does all the users of your company follow the same convention? If there are no user id with gevinti and gevinti@company.com, i could enhance my macro to use the email address as the id if the email id is not a registered user in Confluence.

              1. Jun 11

                Stefano Gevinti says:

                Yes all users of my company use the same convention. Your enhancement will solve...

                Yes all users of my company use the same convention. Your enhancement will solve our problem. When will you been able to fix it?

                Thanks a lot.

                1. Jun 12

                  huasoon says:

                  How about next monday? I logged the request as CMUP3

                  How about next monday?

                  I logged the request as CMUP3

                  1. Jun 15

                    huasoon says:

                    I emailed version 1.2 to you since the changes on this page are freezed. It wil...

                    I emailed version 1.2 to you since the changes on this page are freezed.

                    It will allow email as user id and will send notification email if there are any errors. Do let me know if it works for you.

                    1. Jun 17

                      Stefano Gevinti says:

                      Yes, now it works perfectly. Thank you so much. Stefano.

                      Yes, now it works perfectly. Thank you so much.

                      Stefano.

  3. May 17, 2008

    huasoon says:

    Thanks for your support The jira tracking for this plugin has been created. Yo...

    Thanks for your support

    The jira tracking for this plugin has been created. You can log your issues at http://developer.atlassian.com/jira/browse/CMUP

  4. Oct 07

    Mette Larsen says:

    Hi! I've installed this plugin, but I'm having some issues with matching th...

    Hi!

    I've installed this plugin, but I'm having some issues with matching the e-mail id to the confluence id.
    In our company all logins are 3 characters, but all our e-mails are "full.name@domain.com".
    If i try to mail a blog-post (news), it will be rejected saying "The user id is not a registered Confluence user"

    Any idea how to solve this?

    Thanks!

    Regards,
    Mette Larsen

    1. Oct 22

      Andy Brook says:

      Is your user repository backed by LDAP? Seems like an extension point is needed...

      Is your user repository backed by LDAP?

      Seems like an extension point is needed to translate emails to ID's. I had to do this to support inbound mail handling for Jira for my orgs LDAP (Active Directory) userbase to manage multiple alternate email formats; code is in the Extendable Mail Handler for interest.

      By the way, couldn't agree more about painful per-Space mail configuration, at least jira had a 'catchmail' property, so I only needed to configure one handler, ever. For Confluence and Jira I setup a Virtual mailbox, and get the project-key or space-key from the to: address. Works famously in Jira, unfortunately Confluence doesn't have the smarts, so has to have an individual account configured

      1. Oct 07

        Mette Larsen says:

        If just the e-mail address (instead of e-mail id) could be mapped to the user wi...

        If just the e-mail address (instead of e-mail id) could be mapped to the user with the same e-mail address in Confluence, then I think this would solve my issue.

        Nice if this feature could be added to this plugin. Maybe make it configurable, so people can disable this mapping if they think it's unsecure....   

      2. Oct 08

        huasoon says:

        Hi Andy, I designed this plugin in mind to solve this problem. It will only tak...

        Hi Andy,

        I designed this plugin in mind to solve this problem. It will only take a single account to collect emails for various spaces and it is easier just to email to confluence@domainname.com instead of having users to remember so many email addresses. It will also do away with the administration to create new email when new spaces are created.

        Your Extendable Mail Handler plugin is useful. We could collaborate together to provide better email integration between Confluence and Jira

    2. Oct 08

      huasoon says:

      Yes, I placed a simple check to filter off invalid users from blogging. This wor...

      Yes, I placed a simple check to filter off invalid users from blogging. This works on the basis that the user account is managed by LDAP.

      The email archival part will still works perfectly without any checks.

      The matching of an user by email id will not be a perfect solution because it is possible to have multiple confluence accounts with the same email id registered.

      Some possible workarounds:

      • To create a new confluence account with full.name
      • To unify the confluence user id with the email id(would be better) 
      1. Oct 08

        Mette Larsen says:

        I know it won't be perfect, but in my case it will do the job. If multiple user...

        I know it won't be perfect, but in my case it will do the job.
        If multiple users with the same e-mail address is found in Confluence, it could just pick one.
        Any hope you'll be willing to add this as a configurable feature??
        Please

        Unfortunately, I can't change the login name nor the e-mail id...

        1. Oct 12

          huasoon says:

          I am planning a major revamp to include features requested by other users. There...

          I am planning a major revamp to include features requested by other users. Therefore I don't wish to do the configuration portion at the moment.

          If you are still willing to try out, I can add in a customized quick fix for you to try out this plugin.

          1. Oct 16

            Mette Larsen says:

            Great! I'll be happy to try out a quick fix

            Great!
            I'll be happy to try out a quick fix

            1. Oct 20

              Sim Hua Soon says:

              Hi Mette, I have added the function to search users by email, you may download ...

              Hi Mette,

              I have added the function to search users by email, you may download the modified plugin that is attached to the page. Do let me know of your feedback

              1. Oct 24

                Mette Larsen says:

                Thanx, it works! But I get wrong e-mail response. I get 2 emails in reply to...

                Thanx, it works! But I get wrong e-mail response. I get 2 emails in reply to my news-email. First an error saying that the user is not a confluence user, then an e-mail saying "found user" (by matching e-mail).

                 Also it would be a nice feature to make news comments out of e-mail replies

                1. Oct 29

                  huasoon says:

                  Ops. forgot to comment off the debugging codes. I have fixed it and uploaded as ...

                  Ops. forgot to comment off the debugging codes. I have fixed it and uploaded as version 1.2.2.
                  Sorry for the carelessness. I was too excited then

                  Do you mean that replies to the email notifications generated by emails will be added as comments?
                  I have that in mind. Thanks for your suggestion

                  1. Oct 29

                    Mette Larsen says:

                    Thanks for the effort! In my case I'm trying out a solution like this: The ...

                    Thanks for the effort!

                    In my case I'm trying out a solution like this: The e-mail configured to one space in Confluence, is also an mailinglist distributing the same mail to different people. So if you just send a regular e-mail it will go to everybody on the list. If you include space:news in the subject, the e-mail will also be added as a news item in that space in Confluence. If someone replies to the e-mail with subject space:newsI would like this reply to be added as a comment on the news item. One way of solving this can be if the subject already exists as a news item (I think you already have an if-test on that), then the e-mail body could be added as a comment instead. A challenge here is to strip off old text in the e-mail so that each comment doesnt have the entire e-mail history in it (as you would usually have when replying to e-mails).

  5. Oct 16

    Andy Brook says:

    Hi Sim, Having 'One Job' to pull in all the mail would be great, especially if i...

    Hi Sim,
    Having 'One Job' to pull in all the mail would be great, especially if it pulls in all mail at once then discerns the space from the to: address. Currently I have 60 Spaces polling a mail server almost continually...

    There doesn't appear to be a config screen as yet. In order to be listed on the Atlassian plugin list I think such things need to be done so it just works out of the box. I've been looking for an opportunity to do some UI stuff, so this could well be it.

    Here are some features I'd implement:

    • Enable/Disable LDAP email lookup to identify a Confluence user (this only matters if you are are putting mail into a Space, rather than the existing Mail pages. The LDAP lookup comes from the configured atlassian-user /osuser. If crowd is used, things get messy, potentially, supported in-plugin ldap configuration(s) would allow this to be overcome
    • Be able to discern space from the to: address, supporting Virtual Mailboxes (i.e. only one mailbox to setup there as well!)
    • If it doesn't do it yet, I would also want to retain /enable default behaviour to archive mail so it appears in the Mail Tab. can you confirm if this behaviour exists now?

    If I can get the above in place, it would save time managing the system more longer term. Not having to configure per-Space mail configuration is something that should have been fixed long ago, its a pain.

    Is the current Trunk stable right now? I'd like to have a go at doing that on a Fork, see how it goes?

    1. Oct 20

      Sim Hua Soon says:

      Hi Andy, Thanks for your kind offer.  It will be very useful as I haven't ...

      Hi Andy,

      Thanks for your kind offer.  It will be very useful as I haven't explore the LDAP related APIs.
      Yes, if there are any verification errors, the user will not be authenticated and the email will go to the email archives (and appear in the mail tab)

      The current trunk is stable. Do let me know if you need any explanation
      I'm waiting for Plugin Framework 2 to stabilize before spending time to roll out the major features.

      1. Oct 20

        Andy Brook says:

        ok fine, I'm feeling me way through Confluence plugins through another related p...

        ok fine, I'm feeling me way through Confluence plugins through another related project (Live LDAP Search Plugin) doing essentially what I'd need for this plugin to be deployable (relying on config files is just not good enough!). When I get a viable config screen I'll do a sweep of this project to and see what I can add in and introduce the Email alias stuff. BTW, did you remove the target/ folder yet from svn? Also, if you look at the other projects, there is a kind of naming convention, perhaps a project rename would make it fit in better?

        Keep up the good work,
        andy

        1. Oct 29

          huasoon says:

          Thanks for your advice. I have removed the target folder.

          Thanks for your advice. I have removed the target folder.