Question: These are my Tables:

```
MITARBEITER (mid, mname, abtid*)
PROJEKT (prjid, prjname, prjleiter*)
ARBEITSPAKETE (prjid, apid, apbezeichnung, umfangstd)
ARBEITET_AN (mid*, prjid*, apid*, anzahlstd)
ABTEILUNG (abtid, abtname)

```

I want to select all Names From my Mitarbeiter Table, who didnt work for the Projektname "Optimierung Einkauf".

This is my Sql:

```
SELECT DISTINCT MITARBEITER.mname
FROM MITARBEITER
JOIN ARBEITET_AN
ON MITARBEITER.MID = ARBEITET_AN.MID
JOIN ARBEITSPAKETE
ON ARBEITET_AN.prjid = ARBEITSPAKETE.prjid
JOIN PROJEKT
ON ARBEITSPAKETE.prjid = PROJEKT.prjid
where NOT (PROJEKT.prjname = 'Optimierung Einkauf') ;

```

i tried :

```
SELECT DISTINCT MITARBEITER.mname
FROM MITARBEITER
JOIN ARBEITET_AN
ON MITARBEITER.MID = ARBEITET_AN.MID
JOIN ARBEITSPAKETE
ON ARBEITET_AN.prjid = ARBEITSPAKETE.prjid
join PROJEKT
ON ARBEITSPAKETE.prjid = PROJEKT.prjid
where PROJEKT.prjname <> 'Optimierung Einkauf';

```

Why do i get Mitarbeiter who worked for the Projekt ?

Answer: 
**TL;DR** - You're right outgoing email ports are blocked, but incoming email ports are not. If you open them, and run a mail server which listens for incoming emails - you can still receive them. You will need to use 3rd party email sender gateways like SendGrid only to send the emails.

Longer version
--------------

All outgoing traffic to port `25/465/587` are blocked so that people do not abuse GCE for sending out spam, phishing, etc. emails.

You can still run a mail server which just receives emails. In other words, there is no mention that incoming traffic to those ports are blocked. By default GCE firewall blocks all incoming traffic. You will have to [open up these listening ports using firewall rules](https://cloud.google.com/compute/docs/vpc/firewalls).
I'm using Mailgun instead of SendGrid. I forward all the emails to one of my gmail accounts using MailGun's forwarding rules. SendGrid too should have forwarding rules.