1

After some of edited my email.php source code,

Here,

<?php

// $email and $message are the data that is being
// posted to this page from our html contact form
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

require_once('class.phpmailer.php');
require 'PHPMailerAutoload.php';
require 'class.smtp.php';

$mail = new PHPMailer();
$body='hellooooo';
$mail->IsSMTP();

$mail->Host = "ssl://smtp.gmail.com"; // specify main and backup server

$mail->SMTPAuth = true; // turn on SMTP authentication

$mail->Username = "mygmailid@gmail.com"; // SMTP username
$mail->Password = "mygmailpassword"; // SMTP password
$mailer->SMTPSecure = 'ssl';
$mailer->Port = 465;//587;
$mail->AddAddress("bradm@inmotiontesting.com", "Brad Markle");
$mail->SetFrom('rajaselva.csc@gmail.com','Selva Rani');
$mail->WordWrap = 50;

$mail->IsHTML(true);

$mail->Subject = "You have received feedback from your website!";

$mail->MsgHTML($body);

if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}

echo "Message has been sent";
?>

here is html:

<form method="post" action="email.php">
  Email: <input name="email" id="email" type="text" /><br />

  Message:<br />
  <textarea name="message" id="message" rows="15" cols="40"></textarea><br />

  <input type="submit" value="Submit" />
</form>

after run, it shows error like this,

Message could not be sent.

Mailer Error: Extension missing: openssl

Note: I referred similar questions in stack, but it didn't help me, so only i posted new one. and also i m new to php, but i want to know particular this section.

after all, i removed semicolon in this line extension=php_openssl.dll in php.ini file

but still stays same error..

Can anybody help?

Thanks,

Community
  • 1
  • 1
pcs
  • 1,864
  • 4
  • 25
  • 49

0 Answers0