我已经在应用程序端口上发送了1个后台工作人员用于发送电子邮件。从过去的3到4天它不工作,我得到错误“终止与退出代码-2147467259”。Appharbor后台工作者问题 - 错误:“终止退出代码-2147467259”
静态无效的主要(字符串[]参数)
{
while (true)
{
//Worker_Process_For Send Email
EmailCls.SendEmail_ByMailGun("[email protected]", "[email protected]", "Testing Shailesh-live", "body-live");
}
}
公共静态IRestResponse SendEmail_MailGun(串从,字符串,字符串主题:
下面是在背景工人使用脚本,string body)
{
RestClient client = new RestClient();
client.BaseUrl = ConfigurationManager.AppSettings["mailgun_baseurl"].ToString();// "https//api.mailgun.net/v2";
client.Authenticator = new HttpBasicAuthenticator("api", ConfigurationManager.AppSettings["mailgun_key"].ToString());
var mailgun_domain = ConfigurationManager.AppSettings["mailgun_domain"].ToString();
RestRequest request = new RestRequest();
request.AddParameter(mailgun_domain,mailgun_domain, ParameterType.UrlSegment);
request.Resource = "{" + mailgun_domain + "}/messages";
request.AddParameter("from", from);
request.AddParameter("to", to);
request.AddParameter("subject", subject);
request.AddParameter("html", body);
request.Method = Method.POST;
return client.Execute(request);
}
给定脚本工作鳍e在本地机器上,而不是从appharbor中。