Ticket #1199 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Implement an email function for users.

Reported by: pudo Owned by: pudo
Priority: major Milestone:
Component: ckan Keywords:
Cc: Repository: ckan
Theme: notifications

Description (last modified by rgrp) (diff)

We need an email function in CKAN to accept messages sent to users. The basic signature will be:

  • mail_user(user_obj, subject, body, mime_type='text/plain', headers={})

This has a number of use cases:

  • Retrieval of lost passwords
  • E-Mail confirmation

Finally, the mail function should be exposed in the API for sysadmin clients. This way we can have scripts traverse CKAN for 404s, invalid data or missing fields and ping users about that automatically (requires traversal by revision, not package, to get the associated users).

Implementation

Note we have already written code like this (*and* tested it) in isitopen:

Change History

comment:1 Changed 3 years ago by rgrp

Not sure we need exposure this via the API (at least at this point) as things like auto mass emailing could be in done in separate component (that talks to CKAN).

comment:2 Changed 3 years ago by rgrp

  • Owner set to pudo
  • Status changed from new to assigned
  • Description modified (diff)

comment:3 Changed 3 years ago by rgrp

  • Description modified (diff)

comment:4 Changed 3 years ago by pudo

  • Status changed from assigned to closed
  • Resolution set to fixed

merged to default with password reset forms

comment:5 Changed 3 years ago by dread

This was done in branch feature-1198-mailer. No tests - ticketed here: #1222.

Additional feature in this branch 'password reset' was ticket #1186.

Note: See TracTickets for help on using tickets.