ilebora_empowertech 0.0.6 copy "ilebora_empowertech: ^0.0.6" to clipboard
ilebora_empowertech: ^0.0.6 copied to clipboard

A Flutter package for integrating with Bora Empowertech services. Bora Empowertech is a portal to access various Ilebora services.

example/main.dart

import 'dart:convert';

import 'package:ilebora_empowertech/ilebora_empowertech.dart';

void main() async {
  // Create an instance of BoraMailer
  final mailer = BoraMailer(
    userID: 'developer_user_id', //Proovided ID
    apiKey: 'developer_api_key', //Provided key
    to: 'recipient@example.com',
    from: 'sender@example.com',
    subject: 'Subject of the email',
    body: 'Body of the email',
    title: 'Email Title',
  );

  //Attachments
  mailer.addAttachment('path/to/attachment1.pdf');
  mailer.addAttachment('path/to/attachment2.txt');

  final response = await mailer.sendRemote();

  if (response != null) {
    final jsonRes = jsonDecode(response!.body); // parse the json response
    //Do something with the response

    print('Email sent successfully. Response: $jsonRes');
  } else {
    //Handle error
    print('Failed to send email. Error: ${mailer.error}');
  }
}
1
likes
150
pub points
0%
popularity

Publisher

unverified uploader

A Flutter package for integrating with Bora Empowertech services. Bora Empowertech is a portal to access various Ilebora services.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, ilebora_mailer, ilebora_push, ilebora_stk

More

Packages that depend on ilebora_empowertech