import {Card, CardContent, CardDescription, CardHeader, CardTitle} from '@plunk/ui';
import {Mail, Server} from 'lucide-react';
import {ApiKeyDisplay} from './ApiKeyDisplay';
import {useActiveProject} from '../lib/contexts/ActiveProjectProvider';
interface SmtpSettingsProps {
smtpConfig: {
enabled: boolean;
domain?: string;
portSecure?: number;
portSubmission?: number;
};
}
export function SmtpSettings({smtpConfig}: SmtpSettingsProps) {
const {activeProject} = useActiveProject();
if (!smtpConfig.enabled) {
return (
The SMTP relay server is not enabled. Contact your administrator to enable SMTP support for sending emails
via standard mail clients.
SMTP server is running in development mode without TLS encryption. Only use for local testing. For
production, configure the SMTP_DOMAIN{' '}
environment variable and mount TLS certificates.
{smtpConfig.domain}
Use this hostname in your email client configuration
{smtpConfig.portSubmission}
{isDevelopment ? 'Runs without encryption in development' : 'Submission port with STARTTLS encryption'}
{smtpConfig.portSecure}
{isDevelopment ? 'Requires TLS certificates in production' : 'Implicit TLS encryption'}
plunk
Always use "plunk" as the username