Update spam function to use config setting