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="darrenpaulazzopardi@hotmail.com";

$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

 

 

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.