asudhaa
asked on
No connection could be made because the target machine actively refused it 127.0.0.1:25
I am trying to send an email from the ASP.NET page.
But I get the error
No connection could be made because the target machine actively refused it 127.0.0.1:25
I have the following code in my web.config file
<system.net>
<mailSettings>
<smtp from="xxxx.com">
<network
host="localhost"
port="25"
defaultCredentials="true"
/>
</smtp>
</mailSettings>
</system.net>
Actually the port 25 is blocked .if i try with anyother port I get the error .
I tried with port 465 also I got the same error.
can anyone suggest me which port I can use or how can I overcome this error and send an e mail from the Web page
thanks
But I get the error
No connection could be made because the target machine actively refused it 127.0.0.1:25
I have the following code in my web.config file
<system.net>
<mailSettings>
<smtp from="xxxx.com">
<network
host="localhost"
port="25"
defaultCredentials="true"
/>
</smtp>
</mailSettings>
</system.net>
Actually the port 25 is blocked .if i try with anyother port I get the error .
I tried with port 465 also I got the same error.
can anyone suggest me which port I can use or how can I overcome this error and send an e mail from the Web page
thanks
Either you AV is blocking the port (McAfee does this well at my work), or the port is not open (i.e. the service is not running on the machine). Do you have an SMTP server running on your local machine?
ASKER
I have McAfee in my PC.I have SMTP e.mail in the IIS.But when I run the command
telnet Localhost 25 I get the error
Connecting to local host.....could not open connection to the host on port 25.
Is SMTP running in my local machine or not?
What should I do to make SMTP run so that I can send e mail from the Web page?
Thanks
telnet Localhost 25 I get the error
Connecting to local host.....could not open connection to the host on port 25.
Is SMTP running in my local machine or not?
What should I do to make SMTP run so that I can send e mail from the Web page?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.