搜尋套件、儲存庫與 APP 分類

套件詳情v4.0.0

emailjs

EmailJS 幫您直接從 Flutter 應用程式發送電子郵件。不需要伺服器。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1160
喜歡數
46
Pub 分數
160

安裝套件

flutter pub add emailjs

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

EmailJS 允許從 Flutter 應用程式直接發送電子郵件,而無需後端伺服器。它與 EmailJS 服務無縫整合,讓開發者能夠透過簡單的 API 呼叫發送郵件。該套件支援多種平台,包括 Android、iOS、Web、macOS、Windows 和 Linux,非常適合跨平台應用。設定簡單,無需伺服器基礎設施,即可簡化聯絡表單、通知和使用者確認等通訊功能。該套件輕量且易於實作,專注於開發者的便利性與可靠性。

適用情境

  • 發送聯絡表單訊息
  • 用戶註冊確認
  • 密碼重設郵件
  • 事務性通知
  • 自動支援回覆

主要特色

  • 無需伺服器
  • 跨平台支援
  • 簡單 API 結合
  • 安全電子郵件投遞
  • 即時電子郵件追蹤

適合對象

  • 簡單應用訊息
  • 無伺服器應用程式
  • 開發者原型
  • 小型企業應用
  • 僅前端電子郵件需求

使用建議

  • 需要 EmailJS 帳戶
  • 與自定義伺服器相比,自訂選項有限
  • 依賴第三方服務的正常運行時間
  • 速率限制適用
  • 不適用於高容量企業郵件

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Official EmailJS SDK for Flutter

SDK for EmailJS.com customers.
Use you EmailJS account for sending emails.

Disclaimer

This is a flutter-only version, otherwise use

Links

Official SDK Docs

Intro

EmailJS helps to send emails directly from your code. No server is required – just connect EmailJS to one of the supported email services, create an email template, and use our SDK to trigger an email.

Usage

Install EmailJS SDK:

$ flutter pub add emailjs 

Note: By default, API requests are disabled for non-browser applications. You need to activate them through Account:Security.

FAQ

API calls are disabled for non-browser applications

You need to activate API requests through Account:Security.

Examples

send email

import package:emailjs/emailjs.dart as emailjs

Map<String, dynamic> templateParams = {
  'name': 'James',
  'notes': 'Check this out!'
};

try {
  await emailjs.send(
    'YOUR_SERVICE_ID',
    'YOUR_TEMPLATE_ID',
    templateParams,
    const emailjs.Options(
      publicKey: 'YOUR_PUBLIC_KEY',
      privateKey: 'YOUR_PRIVATE_KEY',
    ),
  );
  print('SUCCESS!');
} catch (error) {
  print('$error');
}

init (optional)

import package:emailjs/emailjs.dart as emailjs

// set Public Key as global settings
emailjs.init(const emailjs.Options(
  publicKey: 'YOUR_PUBLIC_KEY',
  privateKey: 'YOUR_PRIVATE_KEY',
));

try {
  // send the email without dynamic variables
  await emailjs.send(
    'YOUR_SERVICE_ID',
    'YOUR_TEMPLATE_ID',
  );
  print('SUCCESS!');
} catch (error) {
  print('$error');
}

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。