The e-mail details are given to the model, and the model categorises the e-mail as Spam or Ham and moves the mail into the appropriate folder.
How does logistic Regression work?
A Logistic Regression algorithm calculates the probability of an example belonging to each category.
The algorithm structure is the same as a Linear Algorithm, which I covered in a previous blog. Each input variable is assigned a coefficient; the difference is that the Log of the Equation is determined, confining the Equation between 0 & 1.
This answer is the probability of the current example being a member of the default category.