You can use Send-MailMessage to send SMTP messages, but use it with caution: DE0005.md
Receiving mail is another thing entirely. PowerShell has no built-in way to do that. You can use the Outlook COM application, but it's not that easy to deal with. You can use a POP3 client, but if you want to do it in PowerShell you'd have to be able to deal with MIME, and that's another problem. You can also use EWS (Exchange Web Services), but that has its own learning curve (although it's not as steep as Outlook's COM model).
Have a look at MailKit and MIMEKit instead.