IANAL, but I think cold emails are still legal in Germany, provided they're not just advertisements (e.g. "someone added you as maintainer of [super awesome project]" is probably OK) and you offer a clearly visible option to unsubscribe (i.e. it shouldn't require posting on a random internet forum to get the attention of a company representative).
In essence, the law prohibits business practices that are an "unacceptable nuisance". While advertising via email spam is clearly called out as such, not all cases are so clear cut and will depend on the judge's opinion of acceptable behavior.