mime change
This commit is contained in:
parent
7343184e99
commit
35261769e2
@ -8,7 +8,6 @@ import { Paperclip, X } from 'lucide-react';
|
|||||||
import { Textarea } from '@/components/ui/textarea';
|
import { Textarea } from '@/components/ui/textarea';
|
||||||
import { decodeComposeContent, encodeComposeContent } from '@/lib/compose-mime-decoder';
|
import { decodeComposeContent, encodeComposeContent } from '@/lib/compose-mime-decoder';
|
||||||
import { Email } from '@/app/courrier/page';
|
import { Email } from '@/app/courrier/page';
|
||||||
import mime from 'mime';
|
|
||||||
|
|
||||||
interface ComposeEmailProps {
|
interface ComposeEmailProps {
|
||||||
showCompose: boolean;
|
showCompose: boolean;
|
||||||
@ -160,13 +159,10 @@ export default function ComposeEmail({
|
|||||||
if (!composeBodyRef.current) return;
|
if (!composeBodyRef.current) return;
|
||||||
const content = composeBodyRef.current.innerHTML;
|
const content = composeBodyRef.current.innerHTML;
|
||||||
|
|
||||||
// Get the content type based on the content
|
|
||||||
const contentType = mime.getType('html') || 'text/html';
|
|
||||||
|
|
||||||
// Create MIME headers
|
// Create MIME headers
|
||||||
const mimeHeaders = {
|
const mimeHeaders = {
|
||||||
'MIME-Version': '1.0',
|
'MIME-Version': '1.0',
|
||||||
'Content-Type': `${contentType}; charset="utf-8"`,
|
'Content-Type': 'text/html; charset="utf-8"',
|
||||||
'Content-Transfer-Encoding': 'quoted-printable'
|
'Content-Transfer-Encoding': 'quoted-printable'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user