smtpman 1.0.2 icon indicating copy to clipboard operation
smtpman: ^1.0.2 copied to clipboard

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

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,
);
propertydesc
senderNameName of Sender
sendToEmailEmail Address where to send mail
subjectSubject of mail
bodyBody of mail
htmlTo 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 ❤️

4
likes
130
pub points
58%
popularity

Publisher

verified publisher iconrohitchouhan.com

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

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter, http

More

Packages that depend on smtpman