Email Setup Guide - IONOS SMTP
Overviewโ
The contact form is configured to use IONOS email hosting with SMTP for sending emails.
โ๏ธ Configurationโ
IONOS SMTP Settings (Already Configured)โ
SMTP Server: smtp.ionos.co.uk
SMTP Port: 587 (TLS)
Authentication: Required
๐ง Setup Instructionsโ
Step 1: Update Your Environment Fileโ
Edit your env.development file and replace the placeholder values:
# Email Configuration (IONOS SMTP)
EMAIL_ENABLED=true
EMAIL_HOST=smtp.ionos.co.uk
EMAIL_PORT=587
EMAIL_USER=your-actual-email@agentification.co.uk # โ CHANGE THIS
EMAIL_PASSWORD=your-actual-password # โ CHANGE THIS
EMAIL_FROM=noreply@agentification.co.uk # โ Sender address
EMAIL_TO=info@agentification.co.uk # โ Recipient address
Replace:
your-actual-email@agentification.co.uk- Your IONOS email addressyour-actual-password- Your IONOS email password- Update
EMAIL_FROMandEMAIL_TOas needed
Step 2: Restart Your Serverโ
After updating the environment file:
# Stop the current server (Ctrl+C)
# Then restart:
python main.py
Step 3: Test the Contact Formโ
- Go to:
http://localhost:3000/contact - Fill out the form
- Submit
- Check your terminal for email status
- Check your inbox at
info@agentification.co.uk
๐งช Testing Modesโ
Development Mode (EMAIL_ENABLED=false)โ
- Logs contact submissions to console only
- No emails sent
- Returns success message
- Good for testing without sending real emails
EMAIL_ENABLED=false
Console output:
============================================================
๐ง EMAIL SIMULATION (EMAIL_ENABLED=false)
============================================================
From: John Doe <john@example.com>
Subject: Question about courses
Message:
I'd like to know more about your courses...
============================================================
Production Mode (EMAIL_ENABLED=true)โ
- Connects to IONOS SMTP server
- Sends actual emails
- Logs success/failure to console
EMAIL_ENABLED=true
Console output (success):
๐ง Connecting to smtp.ionos.co.uk:587...
๐ Starting TLS...
๐ Authenticating as noreply@agentification.co.uk...
๐ค Sending email to info@agentification.co.uk...
โ
Email sent successfully!
From: John Doe <john@example.com>
Subject: Question about courses
๐ Troubleshootingโ
Error: "SMTP Authentication failed"โ
Cause: Wrong username or password
Fix:
- Double-check your IONOS email credentials
- Make sure you're using the full email address as
EMAIL_USER - Verify password is correct (no extra spaces)
EMAIL_USER=your-email@agentification.co.uk # Must be full email
EMAIL_PASSWORD=YourCorrectPassword # Check for typos
Error: "Connection timeout"โ
Cause: Firewall or network issue
Fix:
- Check if port 587 is open
- Try from a different network
- Contact IONOS support if persistent
Error: "Email service configuration error"โ
Cause: Missing credentials in environment file
Fix:
- Verify
EMAIL_USERis set - Verify
EMAIL_PASSWORDis set - Restart server after updating
Emails not arrivingโ
Check:
- โ
Is
EMAIL_ENABLED=true? - โ Did you restart the server?
- โ Check spam folder
- โ
Verify
EMAIL_TOaddress is correct - โ Check terminal for "โ Email sent successfully!"
๐ง Email Formatโ
Email Subject:โ
Contact Form: [User's Subject]
Email Body:โ
New contact form submission from Agentification website:
Name: John Doe
Email: john@example.com
Subject: Question about courses
Message:
I'd like to know more about your courses...
---
This email was sent from the Agentification contact form.
Reply to: john@example.com
๐ Security Notesโ
- Never commit real passwords to git
- Keep
env.developmentandenv.productionin.gitignore - Use environment variables in production (Vercel/deployment platform)
- Consider using app-specific passwords if available
๐ Production Deploymentโ
For Vercel/Production:โ
- Copy
env.production.exampletoenv.production - Update with real credentials
- Or set in Vercel dashboard:
- Go to Project Settings
- Environment Variables
- Add each EMAIL_* variable
Vercel Environment Variables:
EMAIL_ENABLED=true
EMAIL_HOST=smtp.ionos.co.uk
EMAIL_PORT=587
EMAIL_USER=your-email@agentification.co.uk
EMAIL_PASSWORD=your-password
EMAIL_FROM=noreply@agentification.co.uk
EMAIL_TO=info@agentification.co.uk
โ Checklistโ
Before going live:
- IONOS email credentials added to environment file
-
EMAIL_ENABLED=trueset - Server restarted
- Test email sent successfully
- Received test email in inbox
- Production environment variables configured
- Contact form tested on live site
๐ Supportโ
IONOS Support:
- If you have issues with SMTP authentication
- Check your IONOS control panel for SMTP settings
- Verify your email account is active
Code Issues:
- Check terminal for error messages
- Look for "โ" error indicators
- Review the detailed error output
๐ฏ Quick Startโ
Minimum required changes:
- Open
env.development - Change these two lines:
EMAIL_USER=your-actual-email@agentification.co.ukEMAIL_PASSWORD=your-actual-password
- Restart server:
python main.py - Test: Visit
/contactand submit form - Check terminal and your email inbox
That's it! ๐
Last Updated: October 2025