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

  • Home
  • SEARCH
  • 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 6539335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:50:50+00:00 2026-05-25T10:50:50+00:00

Im trying to send email to the user when registering. But its generating an

  • 0

Im trying to send email to the user when registering.
But its generating an error “No connection could be made because the target machine actively refused it 127.0.0.1:25”.

Currently I have add this to the web.config

 <system.net> 
    <mailSettings>
      <smtp>
        <network
          host="localhost"
          port="25"
          defaultCredentials="true"
        />
      </smtp>
    </mailSettings>
  </system.net>
  • 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-25T10:50:51+00:00Added an answer on May 25, 2026 at 10:50 am

    As pointed out by Ben Robinson and Ernest Friedman-Hill you need to have SMTP server installed on your local machine. Otherwise you can use any other host.

       <system.net>
        <mailSettings>
          <smtp from="yourMailId@gmail.com ">
            <network host="smtp.gmail.com" defaultCredentials="false"
          port="587" userName ="yourMailId@gmail.com" password="yourMailPassword" />
          </smtp>
        </mailSettings>
       </system.net>
    

    I used gmail as a host here.

    While using this Don’t forget to enable the SSL

    SmtpClient client = new SmtpClient();
    client.EnableSsl = true;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to send email using smtp authentication through google but I am
I'm trying to send an email in Java but when I read the body
I am trying to send an email from a site I am building, but
I am trying to send an email, via php's mail function to user's every
I am trying to send the user an email and I used this code:
I am getting the following error when trying to send an email message where
Trying to send a PHP email the easy way but I cannot work out
Rails 2.3.11 I'm trying to send an activation-style email whenever a user registers. The
I'm trying to send an email with custom headers but for some reason they
I am trying to send an email from my application when a user logs

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.