如何使用htaccess文件将所有页面(仅限页面)重定向到index.html,而不是重定向图像文件.出于某种原因,我使用此代码并且index.html页面上的图像文件未显示.
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index.html$
RewriteRule .* /index.html [L,R=302]
Run Code Online (Sandbox Code Playgroud) 错误:邮箱不可用。服务器响应为:访问被拒绝-无效的HELO名称(请参阅RFC2821 4.1.1.1)
说明:执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息。
异常详细信息:System.Net.Mail.SmtpException:邮箱不可用。服务器响应为:访问被拒绝-无效的HELO名称(请参阅RFC2821 4.1.1.1)
源错误行61:
Line 59:
Line 60: SmtpClient smtp = new SmtpClient(SMTPServer, SMTPPort);
Line 61: smtp.Credentials = new NetworkCredential(SMTPUserId, SMTPPassword);
Line 62: smtp.Send(mail);
Line 63: }
Run Code Online (Sandbox Code Playgroud)
源文件:\ Websites \ Client \ Reports \ ContactUs.aspx.cs行:61
================================================== =======================
我的源代码:
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
string name = txtFirstName.Text + " " + txtLastName.Text;
string clientID = Session["CustomerID"].ToString();
string message = txtMessage.Text;
string email = txtEmail.Text;
string company = txtCompany.Text;
string phone = txtPhone.Text;
SMTPMailHelper.SendMail(email, …Run Code Online (Sandbox Code Playgroud)