I´m using PhPmailer to send my mails from the website. It´s my first site so i don´t know that much about hosting with Infinityfree. I think i made everything right with it, but it´s not working. There are no errormessages so i`m a bit surprised. I´m using Gmail and i´ve already searched for the solution in the other topics, but i got no result.
Thanks for your help!
Im from germany, so it is written in german. the design for the phone is not finished yet. But for the pc or tablet its finished. Id like to use phpmailer to reset the password.
Commenting is not an issue for me, one thing I love about myself is that I can understand HTML and PHP pretty well without comments (One cannot say the same for CSS though, I use comments galore in that.)
A few things to check:
The PHP file is in the same directory as the HTML file and is called exactly “Nachhilfelehrer-login.php” (Note that filenames are case sensitive)
“Less Secure Apps” is enabled in your Google Account Settings
You are using an App Password (Not the password you use to sign in to Google), and have 2Fa enabled.
What’s this console_log function? Did you verify that this function can correctly produce output? If it didn’t, that would explain why you don’t see anything.
Could you perhaps try using PHP functions directly (like echo, var_dump(), etc.) to try to generate some output?
Also, like Greenreader said, not using 2FA when using Gmail also tends to break. Gmail is quite protective like that.
That’s very odd because your PHPMailer code is configured to either say sent if it succeeded or not sent if it did not succeed. If you don’t see either of those things, something else than just a PHPMailer error is occurring.
First: thanks for your help! When I use the function, every html code after it is no longer executed. In the console was this error:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
So did i integrate the files wrong? ive already searched for this error, but i found nothing with php.
Thanks