Sent email from Wamp
Posted by: Jpergega (---.13-3.cable.virginm.net)
Date: April 04, 2014 04:30PM

Hi

I have followed this video [www.youtube.com] to setup the send email and I have double checked few times but I am getting the error message cannot send email please can you help me to see where went wrong.

and here is my code:

$username = $_POST['username'];
$password = $_POST['password'];
$email= $_POST['email'];
$permission = $_POST['permission'];
$firstname = $_POST['firstname'];
$surname = $_POST['surname'];
$activation = md5(uniqid(rand()));

$sql2 = "INSERT INTO useraccount (username, email, password, permission, activation, firstname, surname) VALUES ('$username', '$email', '$password', '$permission', '$activation', '$firstname', '$surname')";
$result2 = mysqli_query($con,$sql2) or die(mysqli_error());

if($result2)
{
$to = $email;
$subject = "Your comfirmation email";
$header = "from: your name <your email>";
$message = "Thank you for registering with us. You can now login to your account";
$sendmail= mail($to, $message, $subject, $header);

if($sendmail)
{
echo 'Your Confirmation Email Has Been Sent To Your Email Address.<a href="login.php">Click here to Login</a>';
}
else
{
echo 'Cannot send Confirmation link to your e-mail address.<a href="login.php">Click here to Register</a>';
}
}
}
}

Options: ReplyQuote
Re: Sent email from Wamp
Posted by: RiggsFolly (---.as13285.net)
Date: April 04, 2014 04:35PM

The problem will almost definitely be in the fake sendmail setup.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.