if I set up an apache server and call a php script to send out a mail. Should that mail get actually sent out then ?
No! Unless you configure an external SMTP connection.