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 731757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:03:51+00:00 2026-05-14T07:03:51+00:00

I have a very simple .net application for testing SMTP on .net. But i

  • 0

I have a very simple .net application for testing SMTP on .net. But i am receiving this weird error.
“System.Net.Mail.SmtpException: Failure sending mail. —> System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it”

SMTP server is remote and doesn’t need any kind of authentication so i don’t need credentials. But i can send mails from this computer with outlook using same smtp server and same smtp settings without any problem.

Any ideas? It will be appreciated so much.

Imports System.Net.Mail 

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim smtp As New SmtpClient
    smtp.Host = "10.241.128.220"
    smtp.Port = 25
    smtp.Send("nuri-fatih.guler@rzb.ro", "nuri-fatih.guler@rzb.ro", "test", "test")
End Sub
  • 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-14T07:03:51+00:00Added an answer on May 14, 2026 at 7:03 am

    Ensure that the machine you are sending the emails from has permissions to use this mail server as a relay. This is less a programming issue, and more a server issue, so it might be better answered at Serverfault.

    Here’s a good place to start, though: http://support.microsoft.com/kb/895853

    Edit – added.

    I found the list below at a different site.

    These are the 4 most likely causes for the issue.

    1. there isn’t any service running at the IP:Port you specified.
    2. there is a firewall in the way (at the client or server)
    3. there is a virus scanner in the way (at the client or server)
    4. Your mail server doesn’t like the originating IP, so it is dropping the connection.

    My answer above was to address point #4, since most mail servers allow you to block pass-through functionality and open it up to specific IP addresses.

    So the SMTP server has to be configured to allow the IP address of the machine you’re using to use it as a pass-through SMTP server, which is what you’re doing when using the System.Net.Mail namespace and specifying a mail server other than local host.

    Typically, when I have experienced issue #4, I could send using Outlook. In this situation, the following has to be true:

    1. The mail server must be using Exchange
    2. Outlook is connecting using MAPI (the default when connecting to an Exchange server).

    In this case, Exchange works, because IMAP is not being blocked, BUT System.Net.Mail uses SMTP, and SMTP may be blocked when MAPI is not.

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

Sidebar

Related Questions

I have a very simple ASP.Net page that acts as a front end for
I have very simple select like this: SELECT * FROM table WHERE column1 IN
I have a very simple WPF application in which I am using data binding
i have very simple problem. I need to create model, that represent element of
I have a very simple problem which requires a very quick and simple solution
I have a very simple bit of script that changes the status of an
I have a very simple TCP server written in C. It runs indefinitely, waiting
I have a very simple Java RMI Server that looks like the following: import
I have a very simple question. I want to test whether a particular port
I have some very simple code to generate an assembly and invoke a method

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.