diff --git a/app/(main)/[locale]/page.tsx b/app/(main)/[locale]/page.tsx
index 464b795c..0db35bc3 100644
--- a/app/(main)/[locale]/page.tsx
+++ b/app/(main)/[locale]/page.tsx
@@ -1428,6 +1428,27 @@ export default function Home() {
toast.success(t('email_viewer.scheduled_send_created'), {
duration: undoDurationMs,
+ secondaryAction: (pending.emailId && pending.identityId)
+ ? {
+ label: t('email_viewer.send_now'),
+ onClick: () => {
+ void (async () => {
+ try {
+ await client.rescheduleEmailSubmission(
+ pending.submissionId,
+ pending.emailId!,
+ pending.identityId!,
+ new Date(Date.now() + 1000).toISOString(),
+ );
+ clearPendingUndoSend();
+ if (isScheduledView) await fetchScheduledEmails(client);
+ } catch (error) {
+ console.error('Failed to send now:', error);
+ }
+ })();
+ },
+ }
+ : undefined,
action: {
label: t('email_viewer.undo_send'),
onClick: () => {
diff --git a/components/ui/toast.tsx b/components/ui/toast.tsx
index 9e55dc92..25ffe56e 100644
--- a/components/ui/toast.tsx
+++ b/components/ui/toast.tsx
@@ -21,6 +21,7 @@ export interface Toast {
onClick?: () => void;
icon?: React.ReactNode;
action?: ToastAction;
+ secondaryAction?: ToastAction;
}
interface ToastProps {
@@ -117,25 +118,48 @@ export function ToastItem({ toast, onClose }: ToastProps) {
{toast.message && (
{toast.message}
)}
- {toast.action && (
-