473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

mail() function

hi people sorry to bother you with this Question but i am straggling i am nbew to php but i realy keen to use it, the thing is i am trying to use the mail function to receive information from a form but nothing seems to work my code is like this and my php. ini file lookes like this respectively.
Expand|Select|Wrap|Line Numbers
  1. <? 
  2.  $email = $_REQUEST['email'];
  3.  $message = $_REQUEST['message'];
  4.  
  5.   mail ("user@domain.com", "Feedback From Results", 
  6.   $message, "from: $email");
  7.  
  8.  
  9. ?>
  10.  
php.ini
Expand|Select|Wrap|Line Numbers
  1. [mail function]
  2. ; For Win32 only.
  3. SMTP =smtp.blueyonder.co.uk
  4.  
  5. ; For Win32 only.
  6. sendmail_from = user@domain.com
  7.  
rember i am using my localhost.

please help.
Lurryhomes
Jun 14 '07 #1
5 1628
epots9
1,351 Expert 1GB
hi people sorry to bother you with this Question but i am straggling i am nbew to php but i realy keen to use it, the thing is i am trying to use the mail function to receive information from a form but nothing seems to work my code is like this and my php. ini file lookes like this respectively.
Expand|Select|Wrap|Line Numbers
  1. <? 
  2.  $email = $_REQUEST['email'];
  3.  $message = $_REQUEST['message'];
  4.  
  5.   mail ("user@domain.com", "Feedback From Results", 
  6.   $message, "from: $email");
  7.  
  8.  
  9. ?>
  10.  
php.ini
Expand|Select|Wrap|Line Numbers
  1. [mail function]
  2. ; For Win32 only.
  3. SMTP =smtp.blueyonder.co.uk
  4.  
  5. ; For Win32 only.
  6. sendmail_from =user@domain.com
  7.  
rember i am using my localhost.

please help.
Lurryhomes
Hi lurryhomwa welcome to TSDN,

try this:
[PHP]
mail ("user@domain.com", "Feedback From Results", $message, "from:".$email);
[/PHP]

good luck
Jun 14 '07 #2
Hi lurryhomwa welcome to TSDN,

try this:
[PHP]
mail ("user@domain.com", "Feedback From Results", $message, "from:".$email);
[/PHP]

good luck
cheers mate

but this is what come back

Warning: Failed to Connect in l:\program files\webroot\sendmail.php on line 5

so i am not sure is there something with my php/apache i dont know?
Jun 14 '07 #3
epots9
1,351 Expert 1GB
ok, try removing the "from".
[PHP]mail ("user@domain.com", "Feedback From Results", $message);[/PHP] since the from is already in your php.ini

and/or in your php.ini, what is your smtp_port set to? (default: smtp_port = 25)
Jun 14 '07 #4
ok, try removing the "from".
[PHP]mail ("user@domain.com", "Feedback From Results", $message);[/PHP] since the from is already in your php.ini

and/or in your php.ini, what is your smtp_port set to? (default: smtp_port = 25)

that still did not work but
SMTP =smtp.blueyonder.co.uk

that is what i set to in php.ini file

do u have any exmple of how ur php.in file will look like on the mail function
Jun 14 '07 #5
epots9
1,351 Expert 1GB
SMTP = my_outgoing_mail_server
smtp_port = 25

all u have to do is add "smtp_port = 25" (no quotes) under smtp if it isn't already there.
Jun 14 '07 #6

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

Similar topics

4
by: Geoff Soper | last post by:
I'm using the mail() function to send e-mails. The first argument to the function is the e-mail address the mail will be sent to. I understand this should just be in the format 'address@domain' and...
2
by: Web Master | last post by:
Hi, I am having a little issue with Jacks Form mail php script. I have installed it and configured the form to get it to work, but for some bizarre reason I have 2 issues I can't seem to debug....
7
by: Jim Seymour | last post by:
I have a contact form that uses PHP's mail() function. It recently came to my attention that (some?) MS-Windows mail servers may not properly process data given to the mail() function that's only...
2
by: Groupe Eurower | last post by:
Hi, I would like contribute to the PHP development but i don't really know where i can submit my codes ! In fact, i'm a Web Hosting and i authorize the utilisation of the mail() function. ...
3
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...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
3
uranuskid
by: uranuskid | last post by:
Hey folks, I was going to include a contact form on my website. Well, in the first place that seemed an easy thing to do with a form that prompts a PHP file validating the input vaiables and using...
2
by: Ruud | last post by:
Just before leaving for a holiday my collegue modified this script. Now it won't send any body text (The data filled in on the form) and in an error condition it won't send any attachments either....
1
by: maxxxxel | last post by:
Hi Can anyone help me with some asp code , I changed the code to use CDO.message instead of the old cdont.sys to send mail from a ASP webpage which works fine. Our problem is that when we send...
7
by: mukeshrasm | last post by:
Hi I am no able to send mail and it is giving this error Warning: mail(): SMTP server response: 530 5.7.3 Client was not authenticated in c:\inetpub\wwwroot\eshop\includes\classes\email.php on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...
0
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,...
0
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...

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.