Welcome to the Finch Email sending Guide! This guide will walk you through the steps to send emails in your Finch application. Whether you're a seasoned developer or just starting, Finch offers a robust set of tools to simplify server-side web app development.

Send Email

The MailSender class is used to send emails in your Finch application. It contains all the necessary properties to send an email. Here is an example of how to use it:

import 'package:finch/src/mail/mail_sender.dart';

bool res = await MailSender.sendEmail(
  from: '[email protected]',
  fromName: 'Sender Name',
  host: 'smtp.example.com',
  port: 587,
  to: ['[email protected]'],
  subject: 'Test Email',
  html: '<h1>Hello, World!</h1>',
  text: 'Hello, World!',
  username: 'smtp-username',
  password: 'smtp-password',
  ssl: true,
  allowInsecure: false,
);