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;
}
}
}
}
登録は完了しますが、「Failure sending mail」エラーがポップアップし、アクティベーション電子メールは送信されません。 –
「メールの送信に失敗しました」は、捕捉される実際の例外ですか?あなたは、例外についての詳細があるかどうかを確認するためにデバッガをステップアップしようとしましたか? – patmortech
私はPHPに精通していますが、これは私の最初のASPサイトです。それ、どうやったら出来るの? –