我正在构建一个颤振网络我必须通过电子邮件将表单数据发送到我的 Gmail 电子邮件地址,我该怎么办。请帮我。我有用户 "mailer 3.0.4" 和 flutter_email_sender: ^2.2.2 但他们都没有工作......这是我的代码:
// Perform login or signup
Future<void> _validateAndSubmitForInformationForm() async {
print('1');
final MailOptions mailOptions = MailOptions(
body: 'a long body for the email <br> with a subset of HTML',
subject: 'the Email Subject',
recipients: ['bc160201844@vu.edu.pk'],
isHTML: true,
bccRecipients: ['bc160201844@vu.edu.pk'],
ccRecipients: ['bc160201844@vu.edu.pk'],
// attachments: [
// 'path/to/image.png',
// ],
);
print('3');
await FlutterMailer.send(mailOptions);
print('2');
}
Run Code Online (Sandbox Code Playgroud)