无法获取在电子邮件中的超链接 [英] Cannot get hyperlinks in emails

查看:602
本文介绍了无法获取在电子邮件中的超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做什么:我是为用户创造一个电子邮件更新,这会告诉他们的是,已经为他们的帐户密码重置

What I am doing: I was creating an email update for users, which would tell them that there has been a Password reset for their account.

什么$我使用C $ C:我使用 ASP.NET剃刀/网页写的code。和Gmail的SMTP服务器发送电子邮件。密码重置code后,我已经把 WebMail.Send()块。类似以下:

What code I am using: I am using ASP.NET Razor/Web Pages to write the code. And Gmail's smtp server to send emails. After the password reset code, I have put WebMail.Send() in the block. Like the following one:

Response.Write(@"Password reset success! '
Next time login with your new password.");
WebMail.Send(to: WebSecurity.CurrentUserName,
subject: "Password changed for your account",
body: @"Hello " + name + @".<br>
// don't mind the remaining part, its just the bla bla as most sites send..

我收到什么是电子邮件:我收到电子邮件就是我写的文字。但是,这个问题很简单,不管怎样它只是一条线或第二个解决了,但我没能获得在那里我得到的错误。这里是用于电子邮件的图像。

What I recieve as Email: What I recieve as email is just the text that I wrote. But the issue is simple and somehow it will be just a line or a second to tackle that, but I am not able to get where I am getting error. here is the image for the email.

在这两种形象都在圆圈上的话是超链接。我使用&LT; A HREF =本地主机:5878 /接触'&GT;联系我们&LT; / A&GT;创建它们。但是,所有我得到的是与我们联系不含任何 href`。

In both image the words that are in circle are hyperlinks. I uses <a href='localhost:5878/contact'>Contact Us</a> to create them. But all that I get isContact uswithout anyhref` in it.

有关该图像是:

我已为此做了:我已经寻找这个问题。但有时我得到的结果Silverlight项目,或者有时我得到了PHP或像一些答案。我需要为帮助ASP.NET剃刀/网页甚至,告诉我,我究竟做错了什么?为什么不能的href 在电子邮件正文发送?我是不是做错了什么(我相信我)?我是不是能找到帮助,所以我不得不张贴问题。

What I have done for this: I have searched for this issue. But sometimes I get result for Silverlight project, or sometimes I get the answer for PHP or something like. I need help for ASP.NET Razor/Web Pages or even, tell me what am I doing wrong? Why can't href be sent in email body? Am I doing something wrong(I am sure I am)? I was not able to find help, so I had to post a question.

推荐答案

我刚刚从一个人的答案。所以我想在这里分享它。

I just got the answer from a person. So I wanted to share it here too.

问题是URL,这是被封锁的网站通过本地主机:5878 。所以人告诉我要修改的href 本地主机:5878 的http://本地主机:5878 。尝试在此之后。我能够获得工作的链接。他们没有被封锁无论是在电子邮件提供商。

The issue was the URL, that was being blocked by sites localhost:5878. So the person told me to change the href from localhost:5878 to http://localhost:5878. After trying out this. I was able to get the links working. They were not blocked either in the Email provider.

这是我提到的电子邮件阻塞点是有关Outlook。在当我点击链接上,我看到一个消息,我的Outlook帐户为了你的安全,这是禁用的,要启用吗?我不完美,同时又写它。但它听起来是一样的!这意味着该链接被阻止。

The point that I mentioned about the email blockage was about Outlook. In my outlook account when I clicked over links I saw a message, "For you security this is disabled, want to enable it?" I am not perfect while writing it again. But it sounded the same! Which meant that the link was blocked.

和后加入的href 它没有被阻挡了。它是一个已知的问题,而与具有端口名称太像链接发送电子邮件:5878

And after adding href it wasn't blocked any more. Is it a known issue while sending emails with a link that has a port name too, like :5878?

请让我知道。

这篇关于无法获取在电子邮件中的超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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