wow, i have almost the same problem, except my discharge is yellow and it comes out of my throat. it starts as almost a choking problem and i have to kinda force it up my throat and eventually out. they're small pieces, but you're right... TERRIBLE smell! it's disgusting. if i mash them up, the texture you speak of is spot on. it's been happening more lately than ever and it's becoming both a little alarming and a nuisance.
i'm 21, i've been having terrible sinus headaches the past month it seems, and i never made the connection between that and the sudden increase in this discharge. i don't smoke, i've had asthma since childhood.
anyways, it's really gross and i'm hoping someone could shed light on all this.
What you describe suggests that you have a fungal infection of your sinuses or a condition called allergic fungal sinusitis. Either way you will probably need treatment with an anti-fungal drug. You should see an ENT doctor and will almost certainly have x-rays or a CT scan of your sinuses.