473,416 Members | 1,547 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,416 software developers and data experts.

trying to use php and sendmail to generate e-mails from form data

Hi all,

I know that this should be an easy thing, but I haven't figured out how to get this to work on my server at home. I have a roommate who is using PHPBB on his site on the server and that is able to send out e-mails no problem. I have created a simple form that sends data to a php page that then gets the data and then should send it out using the send() function. What is going on in actuality is that upon submitting the html form, the browser just sits there indefinately, it doesn't pass an error message or time out or anything.

I am running Linspire 5.0 with Apache 1.3 and PHP 4.3.10.

I know nothing about sendmail, although the mail() function looks easy enough. I haven't found the php error_log yet. I ran a phpinfo() to try to find it's location, and it just says 'error_log: no value'. Can anyone tell me where I should start? Here is the code for my simple form and php page:

[php]
<html>
<body>
<form method="post" action="sendmail.php">
Email: <input name="email" type="text" /><br>
Message:
<textarea name="message" rows="10" cols="30"></textarea>
<input type="submit" />
</form>
</body>
</html>
[/php]

[php]
<html>
<body>
<?
$email = $_GET['email'] ;
$message = $_GET['message'] ;
mail( "wendall_dogman@yahoo.com", "Email Subject", $message, "From: $email" );
print "Congratulations your email has been sent";
?>
</body>
</html>
[/php]
Sep 28 '06 #1
2 1730
ronverdonk
4,258 Expert 4TB
In your first script tou define the form with action=post.
In your receiving form you use the $_GET array to get the values. Of course your variables do not have a value. You should fill your variables from the $_POST array..

Ronald :cool:
Sep 28 '06 #2
In your first script tou define the form with action=post.
In your receiving form you use the $_GET array to get the values. Of course your variables do not have a value. You should fill your variables from the $_POST array..

Ronald :cool:
wow, that's a no-brainer. I have changed the $_GET array references to $_POST. Still the same result, though, the page just hangs. Any other ideas? Thanks again.
Sep 28 '06 #3

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

Similar topics

4
by: lawrence | last post by:
We're installing a new server at the office and this will be the first server we set up from which we host our website. We got tired of dealing with Interland and decided to bring our hosting...
2
by: Babaloo | last post by:
Hello, I am having a problem with PHP 4.2.2 and RH 8. PHP is working fine except email. I have a test script to send mail, I have sendmail_path = '/usr/lib/sendmail -t -i' set in php.ini,...
4
by: jim | last post by:
Hello, I am having a problem w/SendMail reporting: " No recipient addresses found in header". Funny thing is though, I properly recieve the email message. Thanks for your help. -jim
1
by: Shelly | last post by:
I want to be able to create a sendmail account by commands sent from a web page. I am using php. After everything is done, I want to enter his info into the database (easy) and create this...
1
by: Gaz | last post by:
Hey. I looked at the Sendmail help and did not find a property where i can get an "ok" signal when the email is finally sent. I need something like that to show a "Processing, please stand by"...
4
by: Nilesh | last post by:
I have a server in which sendmail gives problem. How do i change php.ini so that i can use exim for mail() System is FC-6.
0
by: s2rinivasan | last post by:
I am srinivasan I sent a last message hoe to trouble shoot httpd passwd acces problum. In that I didn't menson that OS=RedHat LINUX EL4-2.6.9-5. This question also in the same version. In...
3
by: cluce | last post by:
Can someone tell me how to manipulate my body string so that when the user semds the email, the info that was in the textboxes are on different lines. ex. trying to get this: Sam doe 1234...
11
by: Taras_96 | last post by:
Hi all, The PHP manual states that: "The Windows implementation of mail() differs in many ways from the Unix implementation. First, it doesn't use a local binary for composing messages but only...
3
by: zaxxon25 | last post by:
I am having an issue with attaching 2 attachments one xip and other excel file with email and sending using perl sendmail. I tried to look on various forums and everywhere i get advice using MIME ::...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
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...
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...

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.