A Fast & Light SMTP Mail Sender, with authentication support.

Usage

🚀 import package

import 'package:smtpman/port.dart';
import 'package:smtpman/secure.dart';
import 'package:smtpman/smtpman.dart';

🚀 methods

⭐setServer()

First create a connection with your SMTP server, using SetServer() method

smtpman.setServer(
    host: "smtp.rohitchouhan.com",
    username: "hello@crohitchouhan.com",
    password: "<<password>>",
    authentication: true,
    port: Port.to_587,
    secure: Secure.starttls,
);
propertydescex
hostYour SMTP Server Host Namesmtp.rohitchouhan.com
usernameYour Email Addressflutter@rohitchouhan.com
passwordYour Email PasswordXXXXXXXXX
authenticationTo etablish your auth with smtptrue / false
portYour SMTP PortPort.to_25, Port.to_587,Port.to_465, or custom: 25, 465,587
secureYour SMTP SecureSecure.starttls,Secure.ssl,Secure.auto, or custom: tls,ssl

⭐receipt()

then create receipt() method to add name, body, subject and all.

smtpman.receipt(
    senderName: "Rohit Team",
    sendToEmail: "itsrohitofficial@gmail.com",
    subject: "How are you....",
    body: "Hey, <b>Bro</b>",
    html: true,
);

| property | desc | | ------------ | ------------ | | senderName | Name of Sender | | sendToEmail | Email Address where to send mail | | subject | Subject of mail | | body | Body of mail | | html | To enable html body use true,else false |

⭐send()

send method will return true if mail has send, else false.

if (await smtpman.send() == true) {
    debugPrint("Email has been sent!");
} else {
    debugPrint("Faild to send, please check smtp credential.");
}

developed by Rohit Chouhan ❤️

Libraries

port
secure
smtpman