Jump to content

[SOLVED] changing the phpinfo() so i can use sendmail_from


dazzclub

Recommended Posts

Hi all,

 

i am trying to get my form to sumbit to my database and to my email,

 

this is what i am using to send something to my email, just test to get it to work first;

--------------

<?php

/* Details Of Email */

$to="[email protected]";

$subject="test";

 

$first_name=$_POST['first_name'];

$email=$_POST['email'];

$comments=$_POST['comments'];

 

 

$details= "Email:$clientemail

 

Name:$clientname

 

Message:$message

 

Inquiry:$inquiry

";

mail($to,$subject,$details);

 

?>

when i tried the form and then pressed submit it displayed; Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in E:\wamp\www\drinkpromo\enquiry.php on line 86

 

Now i can make changes to this script but how do i make changes to my phpini. I have looked at the relevant topics and noticed that my sendmail_from and sendmail_path have "no value" besides them, how can i change this?? In theory once these have been set can i then send to my email??

 

kind regards

Dazzclub

 

 

 

 

<?php
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$headers = "From: [email protected]\r\n" .
    "X-Mailer: php";
if (mail($to, $subject, $body, $headers)) {
  echo("<p>Message sent!</p>");
} else {
  echo("<p>Message delivery failed...</p>");
}
?>

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.