const openEmail = () => {
const recipient = "[email protected]";
const subject = encodeURIComponent("Subject Here");
const body = encodeURIComponent("Body content goes here.");
// Check if default email client exists (mailto)
try {
window.location.href = `mailto:${recipient}?subject=${subject}&body=${body}`;
} catch (e) {
// Fallback to Outlook Web App
window.open(
`https://outlook.office.com/mail/deeplink/compose?to=${recipient}&subject=${subject}&body=${body}`,
'_blank'
);
}
};