sendmail 0.0.4
sendmail: ^0.0.4 copied to clipboard
Send Email using java jar for android
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:sendmail/sendmail.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
final _sendmailPlugin = Sendmail();
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
//child: Text('Running on: $_platformVersion\n'),
child: MaterialButton(
onPressed: (){
_sendmailPlugin.sendEmail("user@gmail.com", "password", "Lebanon Exams", "This is a test");
}, color: Colors.green, child: const Text("Show Alert")
),
),
),
);
}
}