473,574 Members | 2,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error using mail() - sendmail_from not set in php.ini or custom From: missing

Hi,

This is the error:

Warning: mail(): "sendmail_f rom" not set in php.ini or custom "From:"
header missing in c:\lserver\test \sendform.php on line 10

This is the code:

<?
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

$from = "From: $email\r\n";

mail( "we*********@my address.com", "Question", $message, $from );
?>
This is from php.ini

[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = me@localhost.co m

; For Unix only. You may supply arguments as well (default: "sendmail -t -
i").
;sendmail_path =

Using Apache 1.3.28 / PhP 4.3.2 on Windows XP. So far other (simple)
scripts worked fine.

Tried everything. Searched the web, there are more people having this
problem, but couldn't find a solution (nor could they....)
Hope anybody can help, I'm getting crazy.........

Thanks,
Edo.
Jul 17 '05 #1
4 32529
"Edo van der Zouwen" <ezouwen@gebrui kershierwetendo meinwel> wrote in message
news:Xn******** *************** ******@216.168. 3.44...
Hi,

This is the error:

Warning: mail(): "sendmail_f rom" not set in php.ini or custom "From:"
header missing in c:\lserver\test \sendform.php on line 10

This is the code:

<?
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

$from = "From: $email\r\n";

mail( "we*********@my address.com", "Question", $message, $from );
?>
This is from php.ini

[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = me@localhost.co m

; For Unix only. You may supply arguments as well (default: "sendmail -t - i").
;sendmail_path =

Using Apache 1.3.28 / PhP 4.3.2 on Windows XP. So far other (simple)
scripts worked fine.

Tried everything. Searched the web, there are more people having this
problem, but couldn't find a solution (nor could they....)
Hope anybody can help, I'm getting crazy.........

Thanks,
Edo.

read your errors, it's all there.
You need to set the sendmail path in your php.ini file to point to a mail
server.

Regards
Richard Grove
http://redeyemedia.co.uk
http://shopbuilder.org

Jul 17 '05 #2
>
read your errors, it's all there.
You need to set the sendmail path in your php.ini file to point to a
mail server.

Regards
Richard Grove
http://redeyemedia.co.uk
http://shopbuilder.org

That is indeed true under Unix. As mentioned, I'm working under Windows XP.

However, I just found a work around: put php.ini not just in c:\windows
\system32, but also in the php install directory (in my case c:\php).

For some reason this fixed my problem........ .
Edo.
Jul 17 '05 #3
>
However, I just found a work around: put php.ini not just in c:\windows
\system32, but also in the php install directory (in my case c:\php).

For some reason this fixed my problem........ .


i have similar problem in windows xp and i solve it by putting the
php.ini in c:\windows, can any one explain to me how this happen?

Regard

Jorn
Jul 17 '05 #4
On 31 Jan 2004 21:57:32 -0800, jo****@yahoo.co m (jo****@yahoo.c om)
wrote:

However, I just found a work around: put php.ini not just in c:\windows
\system32, but also in the php install directory (in my case c:\php).

For some reason this fixed my problem........ .


i have similar problem in windows xp and i solve it by putting the
php.ini in c:\windows, can any one explain to me how this happen?

Regard

Jorn

That's funny :)

I followed the php-installation instructions on
http://www.net-language.com/workshop...sp?workshop=21, where I
was instructed to put php.ini in c:\windows\syst em32 (XP that is), and
to remove it from c:\php......... .

Do you have 2 php.ini 's now, or did you delete the one from c:\php?

Cheers,

Edo.
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2585
by: toufik toufik | last post by:
Hi, I'm having the folowing error : Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in c:\....filename when I try to send a simple email using the folowing code: mail(toufik_i@hotmail.com, "Mon Sujet", "Ligne 1\nLigne 2\nLigne 3"); I'm running Appache/php/mySql,
4
1950
by: Nick Mudge | last post by:
I am trying to use the mail() function in my PHP script, but when I run the script, nothing happens. I am using Windows XP with Apache. I have the current versions of PHP 4, Apache 2, and MySQL. I think I might have to make a configuration in my php.ini file to point to the sendmail program or something. I don't know how to do that. Does...
3
2250
by: Karuna | last post by:
Hi everybody, I have been trying to write a simple mail script using PHP and apache on Windows XP. Eventhough the script is saying that the mail is successfully sent, I am unable get it in my mailbox(I have given my mail address in $to). I am using the mail() function and I have made the following changes in php.ini ; For Win32 only....
3
3300
by: vishal | last post by:
i am getting following error. Warning: mail() : Failed to connect to mailserver at "smtp.gmail.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\LUGUBA\root\site\temp5.php on line 8 i have done the following (1) in php.ini file
0
5701
by: Balakrsihna | last post by:
Hi All, Can anyone tell me how to replace an image in MS Word 2003 using c#.net. I am converting an html file to word doc and sending this as attachment using System.Web.Mail; the recipient could not see the image in attachment. I am using Inlinepicture.Addpicture but still not working
4
3671
by: chris.huh | last post by:
This may not be the best place to put this but i have set up apache as a testing server on my local machine. Whenever i try to use a formmail.php script i downloaded is always come sup saying that i need to configure sendmail_from. I have changed this (in php.ini) to be to my email address and the smtp server is set to be my university's...
6
3695
by: Geoff Berrow | last post by:
I'm doing a bit of work for a guy and on his system the mail() function always returns false, but the mail is sent. Anyone come across this? Any ideas what is causing it and how to fix it? -- Geoff Berrow (put thecat out to email) It's only Usenet, no one dies. My opinions, not the committee's, mine. Simple RFDs...
6
1961
by: Karl Groves | last post by:
I'm trying to work out a mail system which can send an attachment as well as an HTML formatted message (and a default plain text version). I found some pretty good code on PHP.net and modified it a little but I can't seem to get it to work. It attaches the file properly, but only displays the Plain Text message, even in an HTML-capable...
2
2065
by: upendrajpr | last post by:
Dear friends I am sending mail from my site but it gives me some error "Warning: mail() : "sendmail_from" not set in php.ini or custom "From:" header missing in C:\P............." my code is this
0
8053
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8237
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8098
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6454
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5301
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3741
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3752
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1341
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1060
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.