Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

phpmailer form submit successfully but also returns an error

I am using this phpmailer for capturing form data on my website, the data is successfully
sent to the Gmail Address mail but it also returns some weird error on the screen.

when the form is submitted it returns the Success message but it also returns some errors.

Error on Front-end:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Error: 2024-03-01 13:49:23 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP t15-20020a05600c128f00b0041290cd9483sm8333199wmd.28 - gsmtp
2024-03-01 13:49:23 CLIENT -> SERVER: EHLO localhost
2024-03-01 13:49:23 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [94.204.18.156]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2024-03-01 13:49:23 CLIENT -> SERVER: AUTH LOGIN
2024-03-01 13:49:23 SERVER -> CLIENT: 334 VXNlcm5hbWU6
2024-03-01 13:49:23 CLIENT -> SERVER: [credentials hidden]
2024-03-01 13:49:23 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2024-03-01 13:49:23 CLIENT -> SERVER: [credentials hidden]
2024-03-01 13:49:23 SERVER -> CLIENT: 235 2.7.0 Accepted
2024-03-01 13:49:23 CLIENT -> SERVER: MAIL FROM:<hevedym@mailinator.com>
2024-03-01 13:49:23 SERVER -> CLIENT: 250 2.1.0 OK t15-20020a05600c128f00b0041290cd9483sm8333199wmd.28 - gsmtp
2024-03-01 13:49:23 CLIENT -> SERVER: RCPT TO:<mail@email.com>
2024-03-01 13:49:24 SERVER -> CLIENT: 250 2.1.5 OK t15-20020a05600c128f00b0041290cd9483sm8333199wmd.28 - gsmtp
2024-03-01 13:49:24 CLIENT -> SERVER: DATA
2024-03-01 13:49:24 SERVER -> CLIENT: 354 Go ahead t15-20020a05600c128f00b0041290cd9483sm8333199wmd.28 - gsmtp
2024-03-01 13:49:24 CLIENT -> SERVER: Date: Fri, 1 Mar 2024 14:49:22 +0100
2024-03-01 13:49:24 CLIENT -> SERVER: To: "Admin@Tech" <mail@email.com>
2024-03-01 13:49:24 CLIENT -> SERVER: From: Tech Site Form <hevedym@mailinator.com>
2024-03-01 13:49:24 CLIENT -> SERVER: Subject: Contact Form Submission
2024-03-01 13:49:24 CLIENT -> SERVER: Message-ID: <yohFiOOx4dHFSoXEuNMC6Z7096yWAogVn4jdpkEdM@localhost>
2024-03-01 13:49:24 CLIENT -> SERVER: X-Mailer: PHPMailer 6.9.1 (https://github.com/PHPMailer/PHPMailer)
2024-03-01 13:49:24 CLIENT -> SERVER: MIME-Version: 1.0
2024-03-01 13:49:24 CLIENT -> SERVER: Content-Type: text/html; charset=iso-8859-1
2024-03-01 13:49:24 CLIENT -> SERVER:
2024-03-01 13:49:24 CLIENT -> SERVER: Name: Jordan Wallace<br>Email: hevedym@mailinator.com<br>Subject: Blanditiis officia n<br>Message: Suscipit sunt eu et
2024-03-01 13:49:24 CLIENT -> SERVER:
2024-03-01 13:49:24 CLIENT -> SERVER: .
2024-03-01 13:49:24 SERVER -> CLIENT: 250 2.0.0 OK 1709300964 t15-20020a05600c128f00b0041290cd9483sm8333199wmd.28 - gsmtp
2024-03-01 13:49:24 CLIENT -> SERVER: QUIT
2024-03-01 13:49:25 SERVER -> CLIENT: 221 2.0.0 closing connection t15-20020a05600c128f00b0041290cd9483sm8333199wmd.28 - gsmtp
Message has been sent

when the form is submitted so on success I should receive just the success message and on failure just the fail message, not a big message like above.

>Solution :

That is debug output. Disable it by deleting or commenting out the line which sets $mail->SMTPDebug in your code.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading