I was wondering if there is a possibility to call the message body from a path specified instead of a php variable.
Instead of this,
$mail->Body=$body;
is there any way like specifying a path like this ('/mydomain/index.html')
Yes – just read the file yourself:
$mail->Body = file_get_contents('/mydomain/index.html');