Embed logo in Outlook drafts
This commit is contained in:
1 parent
40f314c540
commit
7bbf2e0d4d
3 files changed
+75
-20
No files matched your search
@@ -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 = () => {
|
||||
|
||||
@@ -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 = () => {
|
||||
|
||||
Reference in new issue
Block a user