- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我实际上正在使用 Flutter 开发一个移动应用程序,我希望我可以从它发送一封电子邮件。为此,我尝试使用带有以下代码的 Mailer 插件:
import 'package:flutter/material.dart';
import 'package:mailer2/mailer.dart';
main() {
var options = new GmailSmtpOptions()
..username = 'mer*******@gmail.com'
..password = '*******';
var emailTransport = new SmtpTransport(options);
// Create our mail/envelope.
var envelope = new Envelope()
..from = 'mer*******@gmail.com'
..recipients.add('*******@*****.fr')
..subject = 'Testing the Dart Mailer library'
..text = 'This is a cool email message. Whats up? 語'
..html = '<h1>Test</h1><p>Hey!</p>';
// Email it.
emailTransport.send(envelope)
.then((envelope) => print('Email sent!'))
.catchError((e) => print('Error occurred: $e'));
}
但是,我有以下错误:
I/flutter (22531): Error occurred: type '_AsBroadcastStream<dynamic>' is not a subtype of type 'Stream<Envelope>' where
I/flutter (22531): _AsBroadcastStream is from dart:async
I/flutter (22531): Stream is from dart:async
I/flutter (22531): Envelope is from package:mailer/mailer.dart
有人可以帮助我吗?提前致谢!
最佳答案
在这个文件中
mailer-1.1.4/lib/src/smtp/smtp_client.dart
通过添加“cast()”方法将第 49 和 50 行更新为:
onIdle = _onIdleController.stream.asBroadcastStream().cast();
onSend = _onSendController.stream.asBroadcastStream().cast();
关于email - 使用 Flutter 发送邮件时出现 Mailer Error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50217216/
我有一个 Rails 邮件程序,目前只要用户回复另一个用户的评论,它就会成功发送电子邮件。 (电子邮件发送给被回复的人)。我正在尝试在电子邮件正文中添加一些动态内容,例如回复者的用户名和该用户的评论本
这是我的代码: require 'phpmailertesting/PHPMailerAutoload.php'; $mail = new PHPMailer; //$mail->SMTPDebug
我想获得有关在/etc/aliases 上运行脚本的问题的任何建议。首先,这是我的环境/脚本。 操作系统:centos 6 脚本:python 2.6.6 邮件:sendmail-8.14/dovec
当我在 Rails3 中使用 ActionMailer 时,我试图更好地理解良好的设计模式(如果它有所不同,则为 3.1)。 一般而言,对于 Rails 应用程序,我通常为整个应用程序创建一个邮件程序
我们能否在 PHP 邮件程序中将消息编译并存储为草稿,然后再发送每条消息? 最佳答案 用 PHPMailer 可以做到这一点。在用发送消息通常需要的所有内容配置 PHPMailer 实例后,不要调用
有没有办法将回调函数传递给 Laravel 的邮件程序? 我正在将 Mail 外观与可邮寄类一起使用,该类正在发送附件。我想在发送电子邮件后删除附件形式的存储。 电子邮件作业正在排队 Mail::to
我正在从 nagios 切换到 sensu。我正在使用厨师来自动化这个过程。一切都很好,除了邮件程序,或者实际上,我将它缩小到“管道”,它应该将 json 输出从支票重定向到处理程序。它没有。当我使用
我正在创建一个预订表格作为帮助,但我决定通过域而不是服务器发送邮件。这主要是为了提高安全性并减少响应和数据传输的限制。 过去几天我一直在研究这个,并试图自学如何让它发挥作用。我现在有一个非常简单的工作
这个问题不太可能对任何 future 的访客有帮助;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况相关,通常不适用于互联网的全局受众。如需帮助使这个问题更广泛适用,visit the h
我正在尝试使用 the Mailer Plugin在我的戏里! 2 Java 应用程序。 我按照自述文件中的说明进行操作,但该模块未显示在我的应用程序的依赖项中。 所以当我尝试编译它时 Play !给
我想在电子邮件正文中包含使用 foreach 的结果。当我添加 foreach 语句时,PHP Mailer 似乎只是切断了消息。关于如何在消息正文中包含多个结果有什么想法吗? $mail->Body
我想利用现有的Mailer来自 Jenkins 的插件位于定义管道构建作业的 Jenkinsfile 中。鉴于以下简单的失败脚本,我希望每次构建都会收到一封电子邮件。 stage 'Test' nod
有没有办法拦截对 Play Mailer class 的调用? 我想记录我的应用程序发送的所有电子邮件。我想访问邮件程序方法参数和方法名称,并记录所有这些。 我尝试过使用@With,但我的@Befor
PHP 邮件程序一次发送两封电子邮件,我尝试不循环发送它,只发送一封电子邮件,但结果相同 我在 stackoverflow 上找到了这个但是没有改变任何东西 $mail->SingleTo = tru
我已关注installation steps由django-mailer的存储库提供者提供 但是当我尝试 ./manage.py test mailer 命令时 或./manage.py send_m
首先,我看到了这个问题:Send mail without blocking 'execution' 但是,我需要知道为什么 PHP 不是多线程进程,但如果两个人同时尝试连接却没有问题。 我实际上是通
我正在从数据库表中提取电子邮件地址并遍历它们以发送电子邮件。如果我注释掉 $mailer->send($message); 行,则会发送一封电子邮件,但只发送到表中的最后一行。如果我保留该行,电子邮件
我在下面有以下代码,需要测试在用户被暂停时发送电子邮件。 def suspendClient(client: Client, event: Event): EventResult = {
我最近加入了一个项目,其中每个客户都有自己的自定义 HTML 内容,用于发送给他们客户的电子邮件。 它通过将内容插入带有自定义标签的字符串,然后通过在邮件程序中设置 body 属性来发送,如下所示:
如何在java imap中获取x-mail?我已经编写了一个示例程序,但它运行不正常。我得到空值。我哪里出错了? import com.sun.mail.imap.IMAPFolder; im
我是一名优秀的程序员,十分优秀!