Sending mail without installing an SMTP server(在不安装 SMTP 服务器的情况下发送邮件)
问题描述
我有一个 .Net 应用程序.我希望此应用程序向我发送电子邮件.如何在不安装 SMTP 服务器的情况下实现此功能?
I have a .Net application. I want this application to send an email to me. How do I implement this without installing an SMTP server?
推荐答案
使用 SmtpClient
发送 MailMessage
不需要您在本地计算机上拥有服务器.
Using an SmtpClient
to send a MailMessage
does not require you to have a server on your local machine.
您的电子邮件服务提供商是服务器(例如 smtp.gmail.com),您的 SmtpClient
与它对话.
Your e-mail service provider is the one with the server (e.g. smtp.gmail.com), and your SmtpClient
talks to it.
这篇关于在不安装 SMTP 服务器的情况下发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在不安装 SMTP 服务器的情况下发送邮件


基础教程推荐
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 将数据集转换为列表 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- 如果条件可以为空 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01