0
이전 서버에서 작동하는 데 사용되어 파일을 백업하고 새 서버에서 시스템을 실행합니다. 데이터베이스는 손상되지 않고 연결되어 있으며 파일은 모두 있지만 사용자가 등록 할 때마다 "메일 전송 실패"오류가 발생합니다. 새 서버로 이동 한 후 ASP 메일 기능이 작동하지 않습니다.
이
보내고 활성화 메일을 처리하는 registeration 파일의 라인 : MailClass.MailGonder("[email protected]", TxtEMail.Text, "Aktivasyon Kodu", body, "[email protected]", "mypasswordishere", "mail.mysite.com", 587);
을 그리고 이것은 내가 전체 메일 일 처리 확신 해요 Mail_Class.cs 파일입니다
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Net.Mail;
using System.Net;
namespace Sngl
{
public class MailClass
{
public MailClass() { }
public static void MailGonder(string kimden, string kime, string title, string body, string senderEmail, string senderPassword, string smtpServer, int port)
{
try
{
System.Net.Mail.MailMessage MyMailMessage = new System.Net.Mail.MailMessage(kimden, kime, title, body);
MyMailMessage.IsBodyHtml = true;
MyMailMessage.Priority = System.Net.Mail.MailPriority.High;
System.Net.NetworkCredential mailAuthentication = new
System.Net.NetworkCredential(senderEmail, senderPassword);
System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient(smtpServer, port);
mailClient.EnableSsl = false;
mailClient.UseDefaultCredentials = false;
mailClient.Credentials = mailAuthentication;
mailClient.Send(MyMailMessage);
PropertyClass.Result = true;
}
catch (Exception ex)
{
PropertyClass.Result = false;
PropertyClass.Message = ex.Message;
}
}
}
}
을
등록이 완료되지만 "메일 전송 실패"오류가 나타나고 활성화 이메일이 전송되지 않습니다. –
'메일을 보내지 못했습니다'는 실제 예외가 잡히게됩니까? 예외에 대한 자세한 정보가 있는지 확인하기 위해 디버거를 단계별로 실행 해 보았습니까? – patmortech
저는 PHP에 익숙하지만 이것이 첫 번째 ASP 사이트입니다. 어떻게해야합니까? –