mailjet 1.0.1+1 copy "mailjet: ^1.0.1+1" to clipboard
mailjet: ^1.0.1+1 copied to clipboard

outdated

unofficial Mailjet client

MailJet #

unofficial Mailjet client Hecho en 🇵🇷 por Radamés J. Valentín Reyes


Import package #

import 'package:mailjet/mailjet.dart';
import 'dart:io';

Get API key #

Step 1 #

Step 2 #

Step 3 #

Step 4 #

Copy the credentials from the last page(step 3)


Send Email #

How to send a simple HTML email? #

An example sending and email to oneself

String apiKey = "public key provided by mailjet";
String secretKey = "secret key provided by mailjet";
//An email registered to your mailjet account
String myEmail = "email@domain.com";

MailJet mailJet = MailJet(
  apiKey: apiKey,
  secretKey: secretKey,
);
//Display the response after trying to send the email
print(await mailJet.sendEmail(
  subject: "My first Mailjet email", 
  sender: Sender(
    email: myEmail, 
    name: "My name",
  ), 
  reciepients: [
    Recipient(
      email: myEmail, 
      name: "My other name",
    ),
  ], 
  htmlEmail: "<h3>Dear passenger 1, welcome to <a href='https://www.mailjet.com/'>Mailjet</a>!</h3><br />May the delivery force be with you!",
));

HTML email with attachments #

MailJet mailJet = MailJet(
  apiKey: apiKey,
  secretKey: secretKey,
);
await mailJet.sendEmail(
  subject: "My first Mailjet email", 
  sender: Sender(
    email: myEmail, 
    name: "My name",
  ), 
  reciepients: [
    Recipient(
      email: myEmail,
      name: "My other name",
    ),
  ], 
  htmlEmail: "<h3>Dear passenger 1, welcome to <a href='https://www.mailjet.com/'>Mailjet</a>!</h3><br />May the delivery force be with you!",
  Attachments: [
    File("./images/raw_ware.png"),
  ],
)

Contribute/donate by tapping on the Pay Pal logo/image #


Created by #


References #

3
likes
0
points
6
downloads

Publisher

unverified uploader

Weekly Downloads

unofficial Mailjet client

License

unknown (license)

Dependencies

mimalo, sexy_api_client

More

Packages that depend on mailjet