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 服务器的情况下发送邮件
基础教程推荐
- 将 XML 转换为通用列表 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- c# Math.Sqrt 实现 2022-01-01