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 服务器的情况下发送邮件
基础教程推荐
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- WPF 模态进度窗口 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
