Ensure the SMTP server is configured correctly under Portal Tools > Manage Portal Framework > Portal Framework Settings.
There is a textbox field here, to input the name/IP of the SMTP server. If this has changed recently, or is empty, it will need to be populated with the correct information.
"Localhost" is not a valid value for this field, even if your SMTP server is the same as your Portal Server. Use the IP address in this situation.