A powerful, secure internal-only email system built for enterprises, featuring real-time messaging, admin controls, and internal file attachments. Designed for complete internal communication within your organization, this system works both offline and online.
🔐 Complete Internal-Only Email Communication Solution
SecureMail Internal is a comprehensive platform designed to revolutionize enterprise communication. All emails stay strictly within your organization—no external email integration is possible.
Key Points:
🚫 No External Sending: You cannot send emails to Gmail, Yahoo, Outlook, or any external domains. Communication is strictly internal. Example: Only User A and User B created in this system can email each other.
📧 Internal Sending Only: Emails can only be sent between users registered in the system by the administrator.
🚫 No External Receiving: Emails from external services (Gmail, Yahoo, Outlook) will not reach this system.
🛡️ Enhanced Security: Isolated architecture eliminates external hacking risks, phishing attacks, or unauthorized access to sensitive information.
⚡ Offline/Online Capability: Works seamlessly even when network connectivity is down; all internal emails remain accessible.
💰 Cost Savings: Designed to save ~₹16 lakhs yearly for an employee base of ~880 users, ensuring internal security.
📈 Scalable Architecture: Efficiently supports 10 users to unlimited scale.
🏢 Enterprise Ready: Built to meet enterprise-level internal communication requirements.
- Role-based access control (Admin, Manager, Agent)
- Secure login system with JWT authentication
- Session management and user authorization
- Real-time email messaging with Socket.IO
- Rich text editor for composing emails
- File attachment support (documents, images, etc.)
- Email threading and conversation view
- Read/unread status tracking
- Admin dashboard with user controls
- User role assignment and permissions
- User profile management
- Account activation/deactivation
- Live queue monitoring
- System statistics and analytics
- User activity tracking
- Bulk operations (mark read/unread/archive)
- Email archiving functionality
- Trash system with permanent deletion
- Search and filtering capabilities
- Email categorization
- React 18 with TypeScript
- Vite for fast development
- Tailwind CSS for styling
- Socket.IO Client for real-time updates
- React Router for navigation
- Node.js with Express
- MongoDB for data storage
- Socket.IO for real-time communication
- JWT for authentication
- Multer for file uploads
- Nodemailer for email functionality
- Node.js (v16 or higher)
- MongoDB (local or cloud)
- Clone the repository
git clone https://github.com/Sumitroy1221/internal-email-app.git
cd internal-email-app- Install dependencies
npm install- Environment Setup
Copy
.env.exampleto.envand configure:
cp .env.example .envEdit .env with your settings:
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
PORT=5050
- Start the application
# Development mode
npm run dev
# Or use the one-click launcher
./StartSecureMail.bat- Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5050
| Role | Password | |
|---|---|---|
| Admin | admin@company.com | admin123 |
| Manager | manager@company.com | manager123 |
| Agent | agent@company.com | agent123 |
internal-email-app/
├── public/ # Static assets
├── server/ # Backend code
│ ├── index.js # Main server file
│ └── uploads/ # File uploads directory
├── src/ # Frontend source code
│ ├── components/ # React components
│ ├── contexts/ # React contexts
│ ├── hooks/ # Custom React hooks
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── package.json # Project dependencies
├── vite.config.ts # Vite configuration
└── tailwind.config.js # Tailwind CSS configuration
- Local: http://localhost:3000
- Network: http://YOUR-IP:3000
To use securemail.com instead of IP:
- Edit your hosts file:
C:\Windows\System32\drivers\etc\hosts - Add:
YOUR_IP securemail.com - Access via: http://securemail.com:3000
npm run dev # Start both client and server
npm run client # Start frontend only
npm run server # Start backend only
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLintUse the included StartSecureMail.bat for easy deployment:
- ✅ Automatic dependency installation
- ✅ Network IP detection
- ✅ Server and client startup
- ✅ Browser auto-launch
- ✅ Custom domain instructions
- Instant email delivery using WebSockets
- Live notifications for new emails
- Real-time status updates
- Support for multiple file types
- Secure file upload and storage
- Download functionality
- Attachment preview
- Admin: Full system control, user management
- Manager: Team oversight, queue monitoring
- Agent: Email sending and receiving
- JWT-based authentication
- Role-based access control
- Secure file handling
- Session management
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions:
- Create an issue on GitHub
- Check existing issues for solutions
- Review the documentation
⭐ Star this repository if you find it helpful!