mirror of
https://github.com/Gowtham-Darkseid/MailComposer.git
synced 2026-04-15 16:08:27 +02:00
44ea4d2e64
- Rich email composer with formatting tools (bold, italic, underline, links) - Multi-recipient support (To, CC, BCC fields) - File attachments with drag & drop support - Priority levels and email validation - Draft management with auto-save and cloud sync - Real email sending via EmailJS integration - Responsive design for mobile and desktop - Comprehensive error handling and fallback modes - Complete documentation and setup guides - Firebase integration ready for advanced features Features: ✅ Real email sending (EmailJS) ✅ Rich text editor ✅ File attachments ✅ Draft management ✅ Form validation ✅ Responsive UI ✅ Error handling ✅ Documentation
32 lines
1.2 KiB
JavaScript
32 lines
1.2 KiB
JavaScript
// Firebase configuration
|
|
import { initializeApp } from 'firebase/app';
|
|
import { getFirestore } from 'firebase/firestore';
|
|
import { getFunctions, httpsCallable } from 'firebase/functions';
|
|
|
|
// Your Firebase config object
|
|
// These values come from environment variables
|
|
const firebaseConfig = {
|
|
apiKey: import.meta.env.VITE_FIREBASE_API_KEY || "your-api-key",
|
|
authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN || "your-project.firebaseapp.com",
|
|
projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID || "your-project-id",
|
|
storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET || "your-project.appspot.com",
|
|
messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID || "123456789",
|
|
appId: import.meta.env.VITE_FIREBASE_APP_ID || "your-app-id"
|
|
};
|
|
|
|
// Initialize Firebase
|
|
const app = initializeApp(firebaseConfig);
|
|
export const db = getFirestore(app);
|
|
export const functions = getFunctions(app);
|
|
|
|
// Email sending function
|
|
export const sendEmail = httpsCallable(functions, 'sendEmail');
|
|
|
|
// Test email configuration
|
|
export const testEmailConfig = httpsCallable(functions, 'testEmailConfig');
|
|
|
|
// Get email logs (for admin)
|
|
export const getEmailLogs = httpsCallable(functions, 'getEmailLogs');
|
|
|
|
export default app;
|