Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7647025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:21:38+00:00 2026-05-31T10:21:38+00:00

This used to work on the old server and I got the files backed

  • 0

This used to work on the old server and I got the files backed up and got the system running on the new server. Databases are all intact and connected, files are all there but whenever a user wants to register, they get the “Failure sending mail” error.

This is the line in the registeration file that handles the activation mail sending:

                    MailClass.MailGonder("info@mysite.com", TxtEMail.Text, "Aktivasyon Kodu", body, "info@mysite.com", "mypasswordishere", "mail.mysite.com", 587);

And this is the Mail_Class.cs file which I’m pretty sure handles the whole mail thing:

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;
        }
    }
}
}

So what am I doing wrong? This used to work on the old server but the guy who set it up for me there doesn’t reply to my emails or calls. I’ve tried for hours trying to get this up and running but nothing works. I tried using the internal subdomain of hosting as mail server, tried using ip and still it’s the same result. double checked everything, the email address is there and the password is the same as the one in the file.

What can I do to know what’s wrong? Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:21:39+00:00Added an answer on May 31, 2026 at 10:21 am

    Are you sure that the mail server isn’t performing some authentication/security based on source IP?

    Can you telnet to the mail server from the web server? e.g. telnet mailserverip port

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I swear this used to work, but it's not in this case. I'm trying
This code used to work but doesnt any more. i used a breakpoint, and
...at least to me. This code used to work fine. I'm pretty sure nothing
This piece of code used to work in MVC 1 but it does not
this code in my plugin used to work just fine: jQuery('#embedded_obj', context).get(0).getVersion(); and the
Does your work environment use Harvest SCM? I've used this now at two different
The company I work in has suffered a major server failure. During this failure
Update, Solved: After all this I found out that I was calling an old
At work, I am working with this old legacy code modified Cake-PHP code that
This code used to return my local ip address as 192.xxx.x.xxx but now it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.