错误:如何使用smtp服务器在C#中从gmail发送电子邮件 [英] Error : How to send email from gmail in C# using smtp server

查看:90
本文介绍了错误:如何使用smtp服务器在C#中从gmail发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用smtp服务器在C#中从gmail发送电子邮件

---------------------------- -------



嗨朋友们,

从c#Windows应用程序发送电子邮件时遇到问题。

顺便使用端口587和

SmtpClient SmtpServer =新的SmtpClient(smtp.gmail.com);





1)如果我使用笔记本电脑运行此电子邮件程序。它发送成功



2)如果我从桌面运行此程序(连接到域)它不发送。



我想在域名机器上运行这个程序。



请帮帮我。



在此先感谢。

How to send email from gmail in C# using smtp server
-----------------------------------

Hi Friends,
Am facing problem while sending email from c# Windows Application.
By the Way am using port 587 and
SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");


1) If I run this emailing program by using my laptop. it sends successfully

2) If I Run this program from desktop (Which is connected to Domain) it doesn't send.

I want to run this program in domain machine.

Please can you help me.

Thanks in advance.

推荐答案

根据程序无法从您的域内执行的描述,听起来好像你有防火墙防范沟通。检查Windows防火墙和可能的其他防火墙是否使用端口587通过通信。
Based on the description that the program works id not executed from inside your domain, it sounds like you have a firewall preventing the communication. Check that Windows firewall and possible other firewalls let through the communication using port 587.


这篇关于错误:如何使用smtp服务器在C#中从gmail发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆