Views/Set/System/WebSiteTestMail.ashx
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ WebHandler Language="C#" Class="WebSiteTestMail" %>
using System;
using System.Web;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Collections.Generic;
using MicroDBHelper;
using MicroPublicHelper;
using MicroAuthHelper;
using Newtonsoft.Json.Linq;
public class WebSiteTestMail : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string flag = "测试发送失败。<br/>The test sent failed.",
Action = context.Server.UrlDecode(context.Request.Form["action"]),
MID = context.Server.UrlDecode(context.Request.Form["mid"]),
Fields = context.Server.UrlDecode(context.Request.Form["fields"]);
if (!string.IsNullOrEmpty(Fields))
flag = TestSendMail(Fields);
context.Response.Write(flag);
}
private string TestSendMail(string Fields)
{
string flag = "测试发送失败。<br/>The test sent failed.", ToAddress = string.Empty, Subject = string.Empty, Content = string.Empty;
dynamic json = JToken.Parse(Fields) as dynamic;
ToAddress = json["txtMailAddress"];
Subject = json["txtSubject"];
Content = json["txtContent"];
try
{
if (MicroPublic.SendMail(ToAddress, "", Subject, Content))
flag = "True发送成功。<br/>The send was successfully.";
}
catch (Exception ex)
{
flag = ex.ToString();
}
return flag;
}
public bool IsReusable
{
get
{
return false;
后面还有 4 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
