473,469 Members | 1,556 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to fix error with mail function

10 New Member
Hello everybody,
I'm trying to send the informations from the web form of my site to my email.

The problem is that I always get this kind of error:

PHP Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in D:\Home\wwwroot\form\invioform.php on line 12

Somebody can tell me what exactly means this error?

Thank you very much
Oct 27 '10 #1
2 2142
JKing
1,206 Recognized Expert Top Contributor
You need to let the function know who the mail is coming from. Either by setting a From header or modifying your php.ini file.

Straight from the php.net website:
Note:

When sending mail, the mail must contain a From header. This can be set with the additional_headers parameter, or a default can be set in php.ini.

Failing to do this will result in an error message similar to Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing. The From header sets also Return-Path under Windows.
Have a read over this and it should explain everything. PHP Mail Function
Oct 27 '10 #2
mfaisalwarraich
194 New Member
are you trying to send it through http://localhost?
Oct 29 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: A. Name | last post by:
Hello All! I'm a newbie to Linux and to PHP, so please be kind. I'm trying to tie into SendMail with some code and get the following error: Fatal error: Call to undefined function: mail() in...
4
by: Edo van der Zouwen | last post by:
Hi, This is the error: Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in c:\lserver\test\sendform.php on line 10 This is the code:
4
by: CoralineSage | last post by:
Hi All, I'm running a bulleting board in PHP and everytime a new user registers s/he is supposed to receive an email confirmation. After filling out the registration form and clicking on submit...
21
by: Karl O. Pinc | last post by:
FYI, It'd be nice if the error message from a REFERENCES constraint mentioned the column name into which the bad data was attempted to be inserted. In PostgreSQL 7.3: sandbox=> insert into...
0
by: Marcel Boscher | last post by:
Hello everybody, i get strange error messages when trying to call up my function with a SELECT functionname(with or without int); varying from: ERROR: function chr(double precision) does...
5
by: universalbitmapper | last post by:
Hi, I'm trying to send an e-mail from a .php script and ie6 returns this error: Warning: mail() : Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port"...
0
by: MAILER-DAEMON | last post by:
This is a multi-part message in MIME format. --HKLMNNOPQQRSTUUVWXXYZaabcdeffghiijklmmno Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit This message has been...
9
bonski
by: bonski | last post by:
hello everybody.. i just want to know what this error means... Error: mail() : SMTP server response: 501 #5.1.1 bad address the smtp set up was correct.. valid emails... and port. so im just...
1
by: lisa007 | last post by:
Warning: mail() : SMTP server response: 503 valid RCPT command must precede DATA on whenever user click on to get new password but doesnt fill in the username field it shows that message i have...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.