Streamline ticket approvals directly from your inbox! No login required, secure tokens, instant responses.
- πΊπΈ English β You are here
- π§π· PortuguΓͺs (Brasil)
Mail Approve is a powerful GLPI 11 plugin that transforms ticket workflows by allowing users to approve, reject, and respond to surveys directly from their email inbox. No GLPI login required, no authentication hassles β just secure, one-click actions with cryptographic token validation.
- π Ticket Validation Approvals β Approve/reject ticket validations instantly
- β Solution Acceptance β Accept or reject proposed solutions
- β Satisfaction Surveys β Rate ticket solutions with star ratings
- π Secure Workflows β Token-based authentication with SHA-256 hashing
- π± Mobile-Friendly β Beautiful responsive UI for all devices
| Feature | Description |
|---|---|
| π No Login Required | Actions are authenticated via secure, single-use cryptographic tokens |
| π‘οΈ Enterprise Security | Compliant with GLPI 11 security standards, CSRF protection, SHA-256 token hashing |
| β±οΈ Auto-Expiration | Tokens expire automatically (configurable, default: 72 hours) |
| π± Fully Responsive | Perfect rendering on desktop, tablet, and mobile devices |
| π¨ Customizable UI | Rejection forms, star ratings, and styled HTML responses |
| π Audit Logging | Complete audit trail of all token actions and approvals |
| βοΈ Easy Configuration | GUI-based plugin settings in GLPI admin panel |
| π Multi-Language | Supports English and Portuguese (pt_BR) |
- GLPI: 11.0.0 or higher (< 11.99.99)
- PHP: 8.2 or higher
- Database: MySQL/MariaDB compatible
# Navigate to your GLPI plugins directory
cd /path/to/glpi/plugins/
# Clone or download mailaprove
git clone https://github.com/celsocaninde/mailaprove.git
# OR
unzip mailaprove.zip- Log into GLPI as a Super-Administrator
- Navigate to: Setup β Plugins
- Locate "Approval By Mail" in the plugin list
- Click Install button
- Click Enable button
- β Ready to go!
After installation, access plugin settings:
Setup β Plugins β Approval By Mail (or click the βοΈ gear icon)
- β±οΈ Token Expiration Time β Set how long tokens remain valid (default: 72 hours)
- π Token Retention Period β Keep used tokens for audit (default: 30 days)
- π Audit Log Retention β Archive audit logs after N days (default: 180 days)
- β Enable Validations β Turn ticket validation approvals on/off
- β Enable Solutions β Turn solution acceptance on/off
- β Enable Satisfaction β Turn satisfaction surveys on/off
To activate Mail Approve features, add custom tags to your email templates in GLPI.
Setup β Notifications β Notification Templates
<p>To approve this request, click here:
<a href="##ticket.validation.accepturl##" style="background: #28a745; color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px;">
β
Approve
</a>
</p>
<p>To reject this request, click here:
<a href="##ticket.validation.rejecturl##" style="background: #dc3545; color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px;">
β Reject
</a>
</p><p>To accept this solution, click here:
<a href="##ticket.solution.accepturl##" style="background: #17a2b8; color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px;">
β Accept Solution
</a>
</p>
<p>To reject this solution, click here:
<a href="##ticket.solution.rejecturl##" style="background: #ffc107; color: black; padding: 10px 20px; text-decoration: none; border-radius: 4px;">
β Reject Solution
</a>
</p><p>Please rate this ticket solution:
<a href="##ticket.satisfaction.url##" style="background: #6f42c1; color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px;">
β Rate Now
</a>
</p>- β SHA-256 Token Hashing β Tokens are hashed in database, never stored in plain text
- β Single-Use Tokens β Each token can only be used once
- β Automatic Expiration β Configurable token lifespan prevents abuse
- β CSRF Protection β Full compliance with GLPI 11 CSRF standards
- β Audit Logging β Every action is logged with IP, user agent, timestamp
- β Stateless Paths β Mail endpoints bypass authentication without compromising security
All approvals and rejections are logged with:
- User identifier
- IP address
- User agent (browser/client info)
- Timestamp
- Action type and result
mailaprove/
βββ README.md # This file
βββ LICENSE # GPLv3+ License
βββ composer.json # PHP dependencies
βββ hook.php # Plugin lifecycle hooks
βββ setup.php # Plugin metadata & installation
βββ ajax/
β βββ template.preview.php # Email template preview
βββ front/
β βββ approve.php # Validation approval form
β βββ reject.php # Validation rejection form
β βββ solution_approve.php # Solution acceptance
β βββ solution_reject.php # Solution rejection
β βββ satisfaction.php # Satisfaction survey
β βββ config.form.php # Plugin configuration UI
β βββ audit.php # Audit log viewer
βββ src/
β βββ AuditLog.php # Audit logging service
β βββ Config.php # Configuration management
β βββ NotificationHandler.php # Email tag injector
β βββ PublicAction.php # Public endpoint handler
β βββ Token.php # Token generation & validation
βββ templates/
β βββ action_confirm.php # Confirmation page
β βββ reject_form.php # Rejection form UI
β βββ satisfaction_form.php # Satisfaction survey UI
βββ locales/
βββ en_US.po / en_US.mo # English translations (source + compiled)
βββ pt_BR.po / pt_BR.mo # Portuguese (Brazil) translations (source + compiled)
- User receives email with validation notice
- User clicks "Approve" link from inbox
- Browser opens secure form (no login required)
- Action is recorded in GLPI automatically
- Audit log updated with timestamp and IP
- User receives satisfaction request email
- User clicks "Rate Now" link
- Beautiful star rating form opens
- User submits rating + optional comments
- Survey recorded in GLPI + audit trail created
Mail Approve exposes public endpoints for email actions:
| Endpoint | Method | Purpose |
|---|---|---|
/plugins/mailaprove/front/approve.php |
GET/POST | Approve ticket validation |
/plugins/mailaprove/front/reject.php |
GET/POST | Reject ticket validation |
/plugins/mailaprove/front/solution_approve.php |
GET/POST | Accept solution |
/plugins/mailaprove/front/solution_reject.php |
GET/POST | Reject solution |
/plugins/mailaprove/front/satisfaction.php |
GET/POST | Submit satisfaction rating |
Authentication: Token-based (no session required)
- β Verify custom tags are added to notification templates
- β Check token expiration settings in plugin config
- β
Ensure
##ticket.validation.accepturl##tags are used correctly
- β Default expiration is 72 hours β adjust in plugin settings
- β Check server time synchronization
- β Review audit logs for token details
- β Verify PHP version β₯ 8.2
- β Check GLPI version is 11.x
- β
Ensure file permissions:
chmod 755 mailaprove - β Clear GLPI plugin cache: Setup β Plugins β Reinstall
Mail Approve supports multiple languages:
- πΊπΈ English (en_US)
- π§π· Portuguese - Brazil (pt_BR)
To add more languages, edit .po files in locales/ and contribute!
We welcome contributions! Please feel free to:
- π Report bugs via Issues
- π‘ Suggest features via Discussions
- π§ Submit pull requests for improvements
- π Help translate to new languages
This project is licensed under the GNU General Public License v3.0 or later (GPLv3+).
See LICENSE file for details.
Community-driven development
Built with β€οΈ for GLPI administrators and users worldwide.
- GLPI team for the excellent ticket management system
- Contributors who've submitted fixes and improvements
- Community for feedback and feature requests
- π Documentation: Wiki
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
Made with β€οΈ for GLPI | β If you find this plugin useful, please star this repository!
To reject this solution, click here: Reject Solution
```<p>Please click here to answer our survey: <a href="##ticket.satisfaction.url##">Answer Survey</a></p>- When GLPI generates a notification, the plugin intercepts the data building process (via the
ITEM_GET_DATAhook). - It generates a cryptographically secure random token and saves its SHA-256 hash in the database.
- The raw token is appended to the action URL and injected into the email template.
- When the user clicks the link, they hit a stateless endpoint (e.g.,
front/approve.php). - The endpoint hashes the token from the URL, looks it up in the database, verifies expiration and usage, and processes the action as the authorized user.
Includes English (en_US) and Brazilian Portuguese (pt_BR) translations. To add more, use Poedit to translate locales/en_US.po and save it as your_lang.po in the locales/ directory, then compile it (msgfmt your_lang.po -o your_lang.mo). GLPI loads the compiled .mo files, so the .mo must be present.