问题描述
嗨朋友
我发送一封带有身体标签链接的邮件,如下所示
body + =< br />< a href ='+ Request.Url.AbsoluteUri.Replace(MaterialRequestForm.aspx,ViewMaterialRequest.aspx?EMPID =+ txtEmployeeID.Text)+'>点击此处查看材料< / a>;
当我从本地系统中的toemail打开此链接时,aspx页面正在显示并且工作正常但是当我尝试打开时在另一个系统中,aspx页面没有显示它显示拒绝访问错误。
我也尝试将ipconfig放在这样的URL中
hi friends
I send a mail with link in body tag like this
body += "<br /><a href = '" + Request.Url.AbsoluteUri.Replace("MaterialRequestForm.aspx", "ViewMaterialRequest.aspx?EMPID=" + txtEmployeeID.Text) + "'>Click here to view Materials</a>";
When I opened this link from toemail in my localsystem the aspx page is dispaying and working perfectly but when I am trying to open in another system the aspx page is not displaying it showing "Access denied" error.
I also tried by placing ipconfig in url like this
body += "<br /><a href = '" + Request.Url.AbsoluteUri.Replace("http://localhost/MaterialRequestForm.aspx", "http://myipconfig/ViewMaterialRequest.aspx?EMPID=" + txtEmployeeID.Text) + "'>Click here to view Materials</a>";</pre>
我的问题是如何打开电子邮件发送链接查看管理员可以通过Lan网络批准或拒绝该aspx页面中的进程的另一台PC查看aspx页面。
请指导我如何实现这一点。 />
提前致谢
我的尝试:
MailMessage mm = new MailMessage(strfromemailId,strtoemail);
mm.Subject =Request;
string body =Hello+ Name.Value +,;
body + =
请点击th e以下链接查看所需材料;
body + =
;
body + =
谢谢;
mm.Body = body;
mm.IsBodyHtml = true;
SmtpClient smtp =新的SmtpClient();
smtp.Host =smtp.gmail.com;
smtp.EnableSsl = true;
NetworkCredential NetworkCred = new NetworkCredential();
NetworkCred.UserName = strfromemailId;
NetworkCred.Password = strPwd;
smtp.UseDefaultCredentials = true;
smtp.Credentials = NetworkCred;
smtp.Port = 587;
smtp.Send(mm);
what my question is how to open email send link in another pc to view the aspx page after view admin may approve or reject the process in that aspx page through Lan network.
Please guide me how to acheive this.
Thanks in advance
What I have tried:
MailMessage mm = new MailMessage(strfromemailId, strtoemail);
mm.Subject = "Request";
string body = "Hello " + Name.Value + ",";
body += "
Please click the following link to view the requested Materials";
body += "
Click here to view Materials";
body += "
Thank you;
mm.Body = body;
mm.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = true;
NetworkCredential NetworkCred = new NetworkCredential();
NetworkCred.UserName = strfromemailId;
NetworkCred.Password = strPwd;
smtp.UseDefaultCredentials = true;
smtp.Credentials = NetworkCred;
smtp.Port = 587;
smtp.Send(mm);
推荐答案
这篇关于如何发送链接到从emil到lan访问aspx页面的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!