mime change
This commit is contained in:
parent
ee78a646b9
commit
bb0a77e40f
@ -114,7 +114,6 @@ async function renderEmailContent(email: Email) {
|
||||
try {
|
||||
if (!email.body) return null;
|
||||
|
||||
// For server-side rendering, parse the email
|
||||
const parsedEmail = await decodeEmail(email.body);
|
||||
|
||||
if (parsedEmail.html) {
|
||||
|
||||
@ -26,14 +26,6 @@ export interface ParsedEmail {
|
||||
headers: Record<string, any>;
|
||||
}
|
||||
|
||||
function getAddressText(address: AddressObject | AddressObject[] | undefined): string | null {
|
||||
if (!address) return null;
|
||||
if (Array.isArray(address)) {
|
||||
return address.map(addr => addr.value?.[0]?.address || '').filter(Boolean).join(', ');
|
||||
}
|
||||
return address.value?.[0]?.address || null;
|
||||
}
|
||||
|
||||
export async function decodeEmail(emailContent: string): Promise<ParsedEmail> {
|
||||
try {
|
||||
const response = await fetch('/api/parse-email', {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user