diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 235eefb..c23b413 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -154,6 +154,11 @@ jobs: run: | echo "${{ secrets.REGISTRY_PASS }}" | docker login registry.infra.mintel.me -u "${{ secrets.REGISTRY_USER }}" --password-stdin + - name: 🧹 Clean runner + run: | + docker system prune -af --volumes + continue-on-error: true + - name: 🏗️ Build and Push uses: docker/build-push-action@v5 with: diff --git a/apps/web/src/components/ContactForm.tsx b/apps/web/src/components/ContactForm.tsx index ea44ab9..84e045a 100644 --- a/apps/web/src/components/ContactForm.tsx +++ b/apps/web/src/components/ContactForm.tsx @@ -246,6 +246,7 @@ export function ContactForm({ onBack={() => setFlow("discovery")} // Can keep, but won't be seen if we hide button onSubmit={() => handleSubmit()} isSubmitting={isSubmitting} + error={error} /> ); } diff --git a/apps/web/src/components/ContactForm/DirectMessageFlow.tsx b/apps/web/src/components/ContactForm/DirectMessageFlow.tsx index 396c80c..b31516e 100644 --- a/apps/web/src/components/ContactForm/DirectMessageFlow.tsx +++ b/apps/web/src/components/ContactForm/DirectMessageFlow.tsx @@ -35,6 +35,7 @@ interface DirectMessageFlowProps { onBack: () => void; onSubmit: () => void; isSubmitting: boolean; + error?: string | null; } export const DirectMessageFlow = ({ @@ -57,10 +58,32 @@ export const DirectMessageFlow = ({ onBack, onSubmit, isSubmitting, + error, }: DirectMessageFlowProps) => { return (
+ {error && ( + +
+
+ +
+
+

+ Übertragungsfehler +

+

+ {error} +

+
+ Status: FEHLER_BEI_SEQUENZ_INIT +
+
+
+
+ )} +
diff --git a/apps/web/src/lib/mail/mailer.ts b/apps/web/src/lib/mail/mailer.ts index 50440a2..061ce14 100644 --- a/apps/web/src/lib/mail/mailer.ts +++ b/apps/web/src/lib/mail/mailer.ts @@ -45,11 +45,23 @@ export async function sendEmail({ subject, html, }: SendEmailOptions) { - const recipients = to || env.MAIL_RECIPIENTS; + let recipients = to || env.MAIL_RECIPIENTS; + let from = env.MAIL_FROM; + + if (!from) { + from = "info@mintel.me"; + console.warn("MAIL_FROM is empty. Using fallback: info@mintel.me"); + } + + if (!recipients) { + recipients = "marc@mintel.me"; + console.warn("MAIL_RECIPIENTS is empty. Using fallback: marc@mintel.me"); + } + const transporter = getTransporter(); const mailOptions = { - from: env.MAIL_FROM, + from, to: recipients, replyTo, subject,