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

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

Developing a C++ Program on Kali Linux Without Installing Additional Software This article is for hackers who want to develop a C++ program on Kali Linux without installing any additional software. Some might say you need to install a separate compiler or extra tools to write and run a simple C++ program on Kali Linux. However, I’ll show you how to do it right out of the box. Pre-installed C++ Compiler in Kali Linux Kali Linux comes with a pre-installed C++ compiler called g++ . We will use this to write and compile a basic "Hello, World!" program. Step 1: Check if g++ is Installed Open your terminal and run the following command: g++ -v If the compiler is installed, you should see version details. If not, you will get an error message. Step 2: Create a C++ File In your terminal, type: nano MyCpp.cpp This will create a C++ file and open it in the Nano editor. Step 3: Write the C++ Code Once Nano opens, enter the following C++ code: #include <...

HOW TO MAKE A SIMPLE TEXT TO SPEECH(TTS) WINDOWS PROGRAM USING C# PROGRAMMING LANGUAGE.

This post is a beginner's guide on how to get started with speech programming in visual studio using c# (c_sharp) programming language. For those who don't know what a programming language is, in a nut shell, a programming language is simply a command based computer language used for instructing a computer to do a particular job. When I say job, I mean very complex job. Write the above definition in an exam and stand a chance of losing marks. The definition isn't all there is about what programming language is, so I suggest you make a good search to learn what programming language really is. Though, this article is for beginners but I will say "BEGINNERS ARE CLASSIFIED", am a beginner. If you are a beginner who hasn't tasted code in his or her life before, I suggest you go start something. A good learning source is "tutorial point", they taught me a lot. Now for you who have tasted code, you will need the following: Computer System running wind...

HOW TO APPLY FALLING TEXT EFFECT IN A CONSOLE PROGRAM WITH THREADING IN C#

"A thread is defined as the execution part of a program. Each thread defines a unique flow of control. If your application involves complicated and time consuming operations then it is often helpful to set different execution paths or threads, with each thread performing a particular job.", says the smart guys behind Tutorials Point.Well, our program is not going to be complicated and we are not going to be performing any time consuming task, we are rather going be creating a camouflage application that gives us the effect similar to what you get when you ping a site or an IP address with the "-t" option in cmd or the effect you see in movies like Blacklist, 24, Person Of Interest and the likes.Now let's stop the ranting and get started.We are going be building this application upon our existing code, one we started in the previous article "How to grammatically Change the background and foreground color of a console Application".Now open up the code in...