E-mail activation not working with php mail

Instead of the one above?

Yes.

I still have the following error: Fatal error : Uncaught Error: Class ‘PHPMailer’ not found in /home/pianocou/public_html/includes/signup2.php:468 Stack trace: #0 {main} thrown in /home/pianocou/public_html/includes/signup2.php on line 468 I should ask my webhost too as to why this is happening

I am also wondering… what is the best way to attach a variabe in a post form?

<form class="signup-form" action="includes/signup2.php?csrf=".$csrf." method="POST">

I got it working but according to some tutorials, they suggest omitting the $mail->isSMTP() but then I thought that it wouldn’t be SMTP in doing so… I also got it to work with this code though and not the one you suggested…

$mail = new PHPMailer\PHPMailer\PHPMailer;

Got this information from stackoverflow:

Alternatively, you can refer to their fully-qualified names directly, without the use statements, for example:

$mail = new PHPMailer\PHPMailer\PHPMailer;

But now I have the following error while including my a href link in my body:

$mail->Body = "Dear $first, $last,
</br />

You have received this e-mail because either you or someone claiming to be you has registered with PianoCourse101.

You must activate your account before you can login by clicking on the link below and we encourage you to check through your details under the “Student’s General Information” section to make sure that it is correct.
</br />Any incorrect information an be updated under the “Student’s Update Profile” Section.
</br />Lessons can be found under the “Watch Videos’” section”and we also strongly encourage you to utilise the “Practice Diary” Section to record your practice.
</br />More importantly, we would like you to have fun when practising and make sure that you are also doing your homework on a regular basis.

If you cannot activate your account for any reasons, then you can request a new token for the primer level under the “Token Request: Primer Level” section and it will send another token that should work.
</br />If all else fails, then you could send an e-mail under the “Contact Us” section and we will assist in activating your e-mail for you.
</br />Also please note that it is best to use a G-mail account when registering with us.
</br />

To activate your account, click here:

> <a href="https://www.pianocourse101.com/includes/activate.php">Activate your Primer Level here!</a>

Also, it won’t direct my page because I have this unusual error:

Warning : escapeshellcmd() has been disabled for security reasons in /home/pianocou/public_html/PHPMailer/PHPMailer.php on line 1632

Then put again the line $mail->isSMTP(); on your code.

I got my link working… :grinning:

But if I put that code again then it won’t work anymore… said something about failed to connect

What does this mean? I have set my debug = 2:

Warning : Creating default object from empty value in /home/pianocou/public_html/includes/signup2.php on line 460

Use this: $mail->SMTPDebug = 2; on your code.

PHPmailer 6 and are intended to be installed with Composer, which is more cumbersome to use. I’m going to find a way to offer that in an easy way.

please do as I really need this to work… Is it true that by getting rid of $mail->isSMTP(); then I won’t be using SMTP but on some video tutorials, they suggest omitting this out and when I do, it does work…

I am still getting my email activation link taking me to this address:

https://www.pianocourse101.com/includes/index.php?activate=missinglink

instead of this:

<a href='https://www.pianocourse101.com/includes/activate.php?email=‘.$email.’&activatetoken=‘.$token4.’>Activate your Primer Level here! I do have the activation.php inside the includes folder though…This is really weird as it shouldn’t happen…

I watched another video and they said that this line $mail->isSMTP() is only used for localhost and not live server but I would like someone to confirm this…

Would appreciate your assistance here…

I have also followed the Godaddy setting but still doesn’t work with SMTP enable

I am also getting some weird symbols appearing in my email and I think it could be my use of the 's but I thought that you would need a / somewhere?

Any incorrect information an be updated under the ‘Student/’s Update Profile’ Section.

Lessons can be found under the 'Watch Videos/’ section and we also strongly encourage you to utilise the ‘Practice Diary’ Section to record your practice.

More importantly, we would like you to have fun when practising and make sure that you are also doing your homework on a regular basis.

This is my code here:

You have received this e-mail because either you or someone claiming to be you has registered with PianoCourse101.

You must activate your account before you can login by clicking on the link below and we encourage you to check through your details under the ‘Student’/s General Information’ section to make sure that it is correct.
</br />Any incorrect information an be updated under the ‘Student’/s Update Profile’ Section. <b

You need to escape characters using the backslash, not the slash, for example:

Any student\'s related work is a thing we take seriously.

or use &#39; to put apostrophes on it:

Any student&#39;s related work is a thing we take seriously.

how do you check if the port is free or not? i tried to telnet but it said telnet is not recognised…

I would still appreciate if you could watch the other tutorials and confirm that for me because I can still get it to work without using SMTP… I have disabled my firewall, uncheckedd the google capatcha but still can’t get it to work and I think it could be an issue with GoDaddy maybe…

I have even tried the godaddy setting but can’t get it to work too…

I have also done the backslash here but it is still showing up weird though:

You have received this e-mail because either you or someone claiming to be you has registered with PianoCourse101.

You must activate your account before you can login by clicking on the link below and we encourage you to check through your details under the ‘Student\’s General Information’ section to make sure that it is correct.

Any incorrect information an be updated under the ‘Student\’s Update Profile’ Section.

Lessons can be found under the 'Watch Videos\’ section and we also strongly encourage you to utilise the ‘Practice Diary’ Section to record your practice.