Fairly basic question on smart contracts for the community.
So smart contracts "live" on the blockchain at a certain address as EVM bytecode.
When they are invoked they execute a function which may or may not change the state of the blockchain on which they "live".
My question is do the functions of a smart contract only ever alter the state of the underlying blockchain or can they also perform some kind of external function?
A simple example would be a smart contract which transfers ether to a different account (blockchain state update) and then sends an email informing the recipient of the transaction (external function not related to the blockchain)?