Embed logo in Outlook drafts

This commit is contained in:
Michael committed 2026-07-14 17:03:19 +02:00
1 parent 40f314c540
commit 7bbf2e0d4d
3 files changed
+75 -20

No files matched your search

+12 -7
View File
@@ -66,14 +66,19 @@ export function EmailCreatorTab() {
}
};
const downloadOutlook = () => {
const downloadOutlook = async () => {
const slug = form.subject.normalize('NFD').replace(/[\u0300-\u036f]/g, '').replace(/[^a-zA-Z0-9]+/g, '-').replace(/^-|-$/g, '').toLowerCase() || 'email';
downloadOutlookDraft({
subject: form.subject,
html: data.html,
filename: `${slug}-outlook.eml`,
});
flash('outlook');
try {
setError('');
await downloadOutlookDraft({
subject: form.subject,
html: data.html,
filename: `${slug}-outlook.eml`,
});
flash('outlook');
} catch (err) {
setError(err.message || "Impossible de créer le brouillon Outlook.");
}
};
const download = () => {
+12 -7
View File
@@ -393,14 +393,19 @@ function EmailModal({ renc, onClose }) {
}
};
const downloadOutlook = () => {
const downloadOutlook = async () => {
const slug = renc.titre.normalize('NFD').replace(/[̀-ͯ]/g, '').replace(/[^a-zA-Z0-9]+/g, '-').toLowerCase();
downloadOutlookDraft({
subject: data.subject,
html: data.html,
filename: `invitation-${slug}-outlook.eml`,
});
flash('outlook');
try {
setError('');
await downloadOutlookDraft({
subject: data.subject,
html: data.html,
filename: `invitation-${slug}-outlook.eml`,
});
flash('outlook');
} catch (err) {
setError(err.message || "Impossible de créer le brouillon Outlook.");
}
};
const download = () => {