Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Hi - ok, tried that, but the message is still: 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 myipaddress:25 at System.Net.Sockets.Socket.DoConnect - tried with 25 and 587 (still can't understand why Outlook can do it, and not code!) Commented Mar 8, 2013 at 23:25
  • how are you connecting to the SMTP server? VPN ? is outlook hosted in the same machine that the code ? Commented Mar 8, 2013 at 23:26
  • Hi - I'm sitting in my home, at my local computer - with Outlook running with the settings as in the screenshot above. The code is running on a dedicated server with UKFast. It is attempting to use the same email account that my local Outlook is hooked up to, to send emails via the other VPS UKFast server that my website is on (website for advertising the application, and the applications itself, are on two separate servers, both hosted by UKFast). Commented Mar 8, 2013 at 23:30
  • I can't see the image 'cause I'm firewalled at work. Could you run the code in your local computer? Are you sure that we are using the right port? Commented Mar 8, 2013 at 23:36
  • Hi @BrOSs - I'm going to mark your resposne as the answer - as it IS working on my local computer for some reason. THere must be something on the dedicated server, stopping it running from there. THank you so much for helping trouble shoot this, I really appreciate your time and patience! Commented Mar 8, 2013 at 23:45