SMTP严重问题找到邮件服务器名称 [英] smtp serever problems find mailserver name

查看:367
本文介绍了SMTP严重问题找到邮件服务器名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我正在使用smtp忘记密码
示例代码:

Dear all,

I am working on smtp forgot password
sample code:

Email.text="hdsjd@gmail.com"
string s="body message";
smtp.host="mail.mydomain.com"
smtp port=25;
smtp.Send(Email.Text, "info@mydomain.com", "Enquiry Details", s);


但我没有收到邮件.我做错了什么?

请帮助我.


but I didn''t get mail. What did I do wrong?

Please help me.

推荐答案

可能是由于各种原因.您需要一一看待它们.
港口开放吗?防火墙权限到位了吗?
进一步确保已正确配置SMTP配置.
It can be because of various reasons. You need to look at them one by one.
Is the port open? Firewall permissions in place?
Further make sure you have configured SMTP configuration properly.


希望 ^ ]可能会为您提供帮助.
Hope this[^] might help you.


使用此
使用System.Net.Mail;


MailMessage邮件=新的MailMessage();
mail.To.Add(TextBox1.Text);

mail.From = new MailAddress(您的用户名");
mail.Subject = TextBox2.Text;

字符串正文= FCKeditor1.Value.ToString();
mail.Body =正文;

mail.IsBodyHtml = true;
SmtpClient smtp =新的SmtpClient();
smtp.Host ="smtp.gmail.com"; //或者您的SMTP服务器地址
smtp.Credentials =新的System.Net.NetworkCredential
(您的用户名",您的密码");
//或者您的Smtp电子邮件ID和密码
smtp.EnableSsl = true;
smtp.Send(mail);
use this
using System.Net.Mail;


MailMessage mail = new MailMessage();
mail.To.Add(TextBox1.Text);

mail.From = new MailAddress("your user name");
mail.Subject = TextBox2.Text;

string Body = FCKeditor1.Value.ToString();
mail.Body = Body;

mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com"; //Or Your SMTP Server Address
smtp.Credentials = new System.Net.NetworkCredential
("your user_name", "your password");
//Or your Smtp Email ID and Password
smtp.EnableSsl = true;
smtp.Send(mail);


这篇关于SMTP严重问题找到邮件服务器名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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