In most cases you won't need to handle server management unless you opt for an unmanaged dedicated server. Plenty of hosting companies take care of everything for less than the cost of the cheapest XenForo Cloud plan.
You have to ensure the default email address matches your domain plus valid SPF, DKIM and DMARC records because the email providers require those to verify your identity.
To avoid these problems we always suggest our customers to send emails through an email provider like https://www.smtp2go.com
The issue isn't in your index.php, it's in your board configuration. The Home button is pointing to localhost path instead of the domain (I can see this because on https://thevapeworkshop.com/xf/index.php the Home link points directly to http://localhost/)
I also recommend enabling Friendly...
Uncheck Enable DKIM signing and clear the job queue (or wait for the next mail job) and check if the error persists. This could be related to this bug which has been fixed: https://xenforo.com/community/threads/dkim-signing-is-broken.234071/
Open src/XF/Util/Ip.php.
find convertIpStringToBinary($ip) function and replace it by the following:
public static function convertIpStringToBinary($ip)
{
if (strpos($ip, "\0") !== false) {
// print the hex of the bad IP
echo "\n[ERROR] Null byte detected in IP string...