Asp.net电子邮件问题 [英] Asp.net Email Problem

查看:88
本文介绍了Asp.net电子邮件问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我解决此问题.



我正在使用以下代码:将构型链接发送给注册客户.
代码如下所示:

MailMessage邮件=新的MailMessage();
SmtpClient SmtpServer =新的SmtpClient("smtp.gmail.com");
mail.From = new MailAddress("MyInfo@gmail.com");
mail.To.Add(Email);
mail.Subject ="InsideVizag";
mail.IsBodyHtml = true;
mail.Body =你好,

我知道你一直在忘记事情,但是丢失我的信息使我感到有些难过.
这表明我们已经失去了很多天.

密码:"+密码;
//mail.Attachments.Add(新附件(textBox3.Text));
SmtpServer.Port = 587;
SmtpServer.Credentials =新
System.Net.NetworkCredential("MyInfo","MyInfo9 $");
SmtpServer.EnableSsl = false;
SmtpServer.Send(mail);



它在本地系统中工作正常...但是当它托管在我的主机服务器中时会出现问题..它不起作用甚至没有给出任何错误..

请帮助我解决此问题..我先感谢他们..

Please help me in solving this problem.



i am using the following code : to send the conformation link to registered customer.
Code Look like this:

MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
mail.From = new MailAddress("MyInfo@gmail.com");
mail.To.Add(Email);
mail.Subject = "InsideVizag";
mail.IsBodyHtml = true;
mail.Body = "Hello,

I know you keep forgetting things, but loosing my information makes me feel a little sad .
This shows we lost touch from many days.
Anyways, I am thrilled and happy to see you back and would love to reveal them for you now.

Password:" + Password;
//mail.Attachments.Add(new Attachment(textBox3.Text));
SmtpServer.Port = 587;
SmtpServer.Credentials = new
System.Net.NetworkCredential("MyInfo", "MyInfo9$");
SmtpServer.EnableSsl = false;
SmtpServer.Send(mail);



its is working fine in Local System...but problem arise when it is hosted in my Hosting Server .. it is not working and not even giving any error..

Plz help me in solving this issue..i thank for them in advance..

推荐答案

);
SmtpServer.EnableSsl = false;
SmtpServer.Send(mail);


它在本地系统中工作正常...但是当它托管在我的主机服务器中时会出现问题..它不起作用甚至没有给出任何错误..

请Plz帮助我解决此问题..我先感谢他们..
");
SmtpServer.EnableSsl = false;
SmtpServer.Send(mail);


its is working fine in Local System...but problem arise when it is hosted in my Hosting Server .. it is not working and not even giving any error..

Plz help me in solving this issue..i thank for them in advance..


您将必须使用托管服务提供商提供的SMTP服务器名称和凭据.
You will have to use the SMTP server name and credentials provided by your hosting service provider.


您定义了:
You defined:
System.Net.NetworkCredential("MyInfo", "MyInfo9


这篇关于Asp.net电子邮件问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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