POSTS
- 1 minutes readIn today’s interconnected world, email communication remains a critical part of our personal and professional lives. If you’re a Flutter developer looking to integrate email functionality into your app, you’re in the right place. In this guide, we’ll explore how to send emails from your Flutter app using Dialoguewise.
First, we will need to import the Dialoguewise package like this:
import 'package:dialogue_wise/dialoguewise.dart';
The next step is to prepare the payload.
var request = EmailRequest();
request.from = '<Senders email Id>';
request.to = ['<Receipient 1 email Id>', '<Receipient 2 email Id>'];
request.cc = ['<Cc Receipient 1 email Id>', '<Cc Receipient 2 email Id>'];
request.bcc = ['<Bcc Receipient 1 email Id>', '<Bcc Receipient 2 email Id>'];
request.subject = "<The email subject>";
request.body = "<The email body>";
Once the payload is ready, you just need to call the service with the payload with your access token.
final dialogueWiseService = DialoguewiseService(
accessToken: '<Provide access token>',
);
var res = await dialogueWiseService.sendEmail(request);
That’s pretty much it! You can take your Flutter app to the next level by incorporating email communication. Happy coding!