2012-03-14 7 views
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; 
    } 
} 
} 
} 
+0

登録は完了しますが、「Failure sending mail」エラーがポップアップし、アクティベーション電子メールは送信されません。 –

+0

「メールの送信に失敗しました」は、捕捉される実際の例外ですか?あなたは、例外についての詳細があるかどうかを確認するためにデバッガをステップアップしようとしましたか? – patmortech

+0

私はPHPに精通していますが、これは私の最初のASPサイトです。それ、どうやったら出来るの? –

答えて

0

提案されたすべてを試した後、古い設定のサーバで同じ設定が行われているので、問題はサーバにあると確信しています。私は何度も何度も何度も何度も再チェックしました。ウェブホストサポートからの回答を待っています。

関連する問題