“Relaying not permitted” suggests that you’re trying to send the email from an address that the SMTP server is not configured to use.
But if you get a parse error, I don’t understand how it’s even trying to send an email.
You can just press Enter every so often to get it onto multiple lines.
A message that you sent was rejected by the local scanning code
that checks incoming messages on this system. The following
error was given: "Relaying not permitted" ------ This is a copy
of your message, including all the headers. ------
Received: from mccwxyys by server165.web-hosting.com with
local (Exim 4.96.2) (envelope-from [<em@icom-design.com>]
(mailto:em@icom-design.com)) id 1smxep-00Ei4a-05 for
[em@icom-design.com](mailto:em@icom-design.com); Sat,
07 Sep 2024 11:47:27 -0400 To: [em@icom-design.com]
(mailto:em@icom-design.com) Subject: MCCW Website
Inquiry X-PHP-Script: [www.mccwimberley.com/formhandle.php]
(http://www.mccwimberley.com/formhandle.php) for 67.79.209.134,
67.79.209.134 X-PHP-Filename:
/home/mccwxyys/public_html/formhandle.php REMOTE_ADDR:
67.79.209.134 Date: Sat, 7 Sep 2024 15:47:26 +0000
From: Form Mail Handler [<em@icom-design.com>]
(mailto:em@icom-design.com) Reply-To: Information
[<em@icom-design.com>](mailto:em@icom-design.com)
Message-ID: [<U89pQgkgDzefwSprG44pVoXqb9LVT4oQknWTBXwFmA@www.mccwimberley.com>]
(mailto:U89pQgkgDzefwSprG44pVoXqb9LVT4oQknWTBXwFmA@www.mccwimberley.com)
X-Mailer: PHPMailer 6.9.1 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0 Content-Type: multipart/alternative;
boundary="b1=_U89pQgkgDzefwSprG44pVoXqb9LVT4oQknWTBXwFmA"
Content-Transfer-Encoding: 8bit
Sender: [<mccwxyys@server165.web-hosting.com>]
(mailto:mccwxyys@server165.web-hosting.com) --
b1=_U89pQgkgDzefwSprG44pVoXqb9LVT4oQknWTBXwFmA
Content-Type: text/plain; charset=us-ascii
Name: Ed Miller | Message: tes | Email: [em@icom-design.com](mailto:em@icom-design.com) --
b1=_U89pQgkgDzefwSprG44pVoXqb9LVT4oQknWTBXwFmA
Content-Type: text/html; charset=us-ascii
<ul>
<li>Name:Ed Miller</li>
<li>Email: [em@icom-design.com](mailto:em@icom-design.com)</li>
<li>Message: tes</li>
</ul>
--
b1=_U89pQgkgDzefwSprG44pVoXqb9LVT4oQknWTBXwFmA--
That would probably be a good start, if you haven’t configured it yourself. The question is, which SMTP server is the site using, and does it allow emails to be sent from the address you specify here:
$mail->setFrom('em@icom-design.com', 'Form Mail Handler');
Did they give you any additional instructions? It looks like they want you to use a defined SMTP server (replacing ‘mywebsite.com’ with the site’s address, etc.
It’s generally expected that you create a DOMAIN email account for handling emails FROM and TO that domain, so create something like info@mccwimberley.com and use that for your site.
OK guys,
In the interest of getting this thing over with, I have heeded Drummin’s advice and created an email account at mccwimberley.com, modified the PHP script and everything works now. Thank you for all your help, it is much appreciated.
Regards, Ed