Skip to main content

Transaction failed. The server response was: Sending address not accepted due to spam filter (SOLVED)

Hello friends, this is a quick one. If you've tried to send a mail via your C# code, chances are that you might have seen this error message:"Transaction failed. The server response was: Sending address not accepted due to spam filter"... Well, sometimes in programming error messages doesn't always explain the exact problem you might be having with your code, but if you look closely to your code in relation with the given error, you will find that the problem is just right under your nose.

It took me almost three hours to solve this error. The annoying part is that I spent the whole of the time trying to research something I would have solved in seconds if I had looked closely enough.

 SmtpClient client = new SmtpClient();
  NetworkCredential Credentials = new NetworkCredential("email", "password");
            client.Credentials = Credentials; //The important line

To cut the whole long story short, if you are not initializing the credential property of the SmtpClient object to the NetworkCredential object, you will surely get this error.

Thanks for dropping by, you can comment your questions below.

Comments

Popular posts from this blog

Microsoft will allow you to upgrade your pirated Windows 7 or 8 to full Windows 10 for little or no amount.

Microsoft's latest Operating System has been trending for a while now, while some are still contemplating on who gets a free upgrade from the two previous Microsoft's Operating Systems just like the company promised and who wouldn't, Microsoft has announced that the upgrade to Windows 10 would be free for genuine Windows 7 or 8 users and there is a good news for pirated Windows 7 or 8 users, they too might go to the Promised Land for free or pay a little fee.Hmmm..., with this in place, you can see how determined Microsoft is to pull everyone into its Windows 10 ecosystem. You know, when Windows 10 Technical Preview was first announced along with how it's going to operate (Windows as a Service), I thought Microsoft is finally kicking Windows Pirates out of business, but it seems Microsoft is giving them one more chance to own a genuine Windows, maybe Windows 10  is going to be "un-piratable" (let's just hope MS gets it right).Hahaha!...., before I forget,

HOW TO WRITE, COMPILE AND RUN C++ CODE ON LINUX KALI

This article is for hackers who want to develop a c++ program on Kali Linux without having to install any additional software. While some would tell you that you need to install an additional software or a compiler in order to develop a simple program in c++ on Kali Linux, I am going to show you how to develop a c++ program on this distro right out of box. Your Linux Kali comes pre-installed with a c++ compiler called g++ so we are going to write a C++ hello word code and compile it with this compiler. Before we get started, first open up terminal and run to verify if this compiler is installed on you machine: g++ -v if the compiler is pre-installed, you should get the version information of the compiler, otherwise, you should get an error. Now let's jump right in. In your terminal window, type in: nano MyCpp.cpp to create a c++ file and lunch it in nano editor for editing. When nano opens, type in the following c++ code and press Ctrl+x then y and then R

HOW TO INSTALL BLOGENGINE.NET WITH VISUAL STUDIO.

Yes there are lots of article on the internet that already describes how to do this, but that wont stop me from sharing my own idea on how I got mine rocking with visual studio 2012. Now here is the story, I woke up one morning and discovered I was departing from being a beginner programmer to a programmer who is at least worthy to be called a programmer. So I felt I needed to share my programming experience and the only known way I could do that, was to start blogging, hmmm... Just like you, I didn't like blogger, I needed  to be my own boss. So, I started my own blog project, but wait....  Why was I doing that when there are open source blog projects being developed and maintained by developers who are more "programmatically" experienced than I?. BlogEngine was the one I chose and the installation was a breeze. All I did was go to the site, downloaded the first zip file which is tagged "web", extracted it to my visual studio project directory, opened vi