diff --git a/app/mail/page.tsx b/app/mail/page.tsx
index 22791cf..92f1e15 100644
--- a/app/mail/page.tsx
+++ b/app/mail/page.tsx
@@ -996,35 +996,37 @@ export default function MailPage() {
{(() => {
try {
const parsed = parseFullEmail(selectedEmail.body);
- return parsed.html || parsed.text || selectedEmail.body;
+ return (
+
+ {/* Display HTML content if available, otherwise fallback to text */}
+
+
+ {/* Display attachments if present */}
+ {parsed.attachments && parsed.attachments.length > 0 && (
+
+
Attachments
+
+ {parsed.attachments.map((attachment, index) => (
+
+
+
+ {attachment.filename}
+
+
+ ))}
+
+
+ )}
+
+ );
} catch (e) {
- console.error('Error parsing email content:', e);
+ console.error('Error parsing email:', e);
return selectedEmail.body;
}
})()}
-
- {(() => {
- try {
- const parsed = parseFullEmail(selectedEmail.body);
- return parsed?.attachments?.length > 0 ? (
-
-
Attachments
-
- {parsed.attachments.map((attachment, index) => (
-
-
-
{attachment.filename}
-
- ))}
-
-
- ) : null;
- } catch (e) {
- console.error('Error parsing email attachments:', e);
- return null;
- }
- })()}
) : (
@@ -1074,6 +1076,39 @@ export default function MailPage() {
onChange={(e) => setComposeTo(e.target.value)}
/>
+
+ {/* CC/BCC controls */}
+
+
+
+
+ {showCc && (
+ <>
+
+
+ setComposeCc(e.target.value)}
+ />
+
+
+
+ setComposeBcc(e.target.value)}
+ />
+
+ >
+ )}
+
setComposeSubject(e.target.value)}
/>
+
+