Open SWEz11 opened 8 months ago
The code:
if ($stmt->execute()) {
$mail = require __DIR__ . "/mailer.php";
$mail->setFrom("noreply@example.com");
$mail->addAddress($_POST["email"]);
$mail->Subject = "Account Activation";
$mail->Body = <<<END
Click <a href="http://example.com/activate-account.php?token=$activation_token">here</a>
to activate your account.
END;
It looks like you need to set the emailer format to HTML:
$mail->isHTML(true);
Hello daveh, thank you for response! It work! But how I can make that when person verify account activation, the system send email like: Thank you, (username) for sign up in my website
-Thanks
In the script that activates the account, use the same technique using PHPMailer
Thank you for response! Last question, how can I edit this line: Because, when a person request for forgot password the sql set set reset_token_expires_at: 2024-02-15 10:20:33, but my time zone is UTC +2 ( Now in my country at this moment I write this message is 11:57).
-Thank you!
Thank you daveh for help!
2024-02-16, pn 08:00, Dave Hollingworth @.***> rašė:
You can set your timezone in [php.ini: https://stackoverflow.com/questions/32224547/setting-the-timezone-for-php-in-the-php-ini-file](php.ini:
https://stackoverflow.com/questions/32224547/setting-the-timezone-for-php-in-the-php-ini-file )
— Reply to this email directly, view it on GitHub https://github.com/daveh/php-account-activation/issues/1#issuecomment-1947805976, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAVNWAG6HV4DWGKA4DB7LJ3YT3YZBAVCNFSM6AAAAABDH3EH5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBXHAYDKOJXGY . You are receiving this because you authored the thread.Message ID: @.***>
Hello, when I signup and the system send the email to me that email looks like this: But I need the word "here" be a button. Thanks!