send email C# using smtp server with username password authentification
I don't think you want to set
mailclient.UseDefaultCredentials = true;
Read more about this option here.
You should also test that you can actually send email through that smtp server.
Try connecting via telnet and authorizing. There are also plenty of services that will let you send a test message online (http://pingability.com/smtptest.jsp for example).
How to send a test email over SMTP with Mailgun using telnet?
For europe, the SMTP address is smtp.eu.mailgun.org
.
Telnet to google mail server
It connects for me too. I think the most likely reason is that your ISP is blocking your external access to port 25. This is a common and sensible thing to do because SMTP from end-user PCs is a significant source of spam.
You may be able to talk your provider into opening the port up for you, or you can use a proxy server out on the 'net, or you can use a different service, such as SSMTP (?) which connects over a secure channel using a different port.
Related Topics
What Is the Linux Built-In Driver Load Order
X86 Linux Assembler Get Program Parameters from _Start
Debugging Shared Libraries with Gdbserver
What Makes a Kernel/Os Real-Time
Numa Aware Cache Aligned Memory Allocation
How to Check Hz in the Terminal
Docker MACvlan Network, Unable to Access Internet
Running Docker on Ubuntu: Mounted Host Volume Is Not Writable from Container
Tracking Threads Memory and CPU Consumption
How to Set Cronjob with Non-Root User
Docker Alpine Executable Binary Not Found Even If in Path
How to Rebuild Rootfs in Buildroot
How to Program for Linux's New 'Fanotify' File System Monitoring Feature
Linux Command Output as a Parameter of Another Command
Bash: Head & Tail Behavior with Bash Script