473,594 Members | 2,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

5 New Member
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="sendmai l.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 "Congratulation s your email has been sent";
?>
</body>
</html>
[/php]
Sep 28 '06 #1
2 1742
ronverdonk
4,258 Recognized Expert Specialist
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
wendallsan
5 New Member
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
7680
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 in-house. The guy doing most of the work struggled with sendmail for awhile and then gave up. Now he's installing Postit, or Postfix, or whatever it's called. Does the PHP mail function depend on sendmail, or can it use any mta software?
2
17174
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, sendmail can send mail from the command line but if I use the script I get the following error on the http log file:
4
4009
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
1808
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 sendmail account. Can anyone give me pointers to explanations/excamples? I have done a quick search on the web, but haven't turned up anything. In addition, I do NOT want to create a regular user account on the server -- only a sendmail account. ...
1
1314
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" screen when the server is sending an email, and when the email is out, another screen appears with an "Email sent" message. Do you know an alternative to the "ok" from the sendmail to do this?
4
5837
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
2464
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 sendmail configuraton I did configure very carefully in /sendmail.mc and redirect it to /sendmail.cf by m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf and alternate the current version to /usr/sbin/sendmail.sendmail but when restart the
3
1173
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 lemon st New Orleans, LA instead of like this:
11
1968
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 operates on direct sockets which means a MTA is needed listening on a network socket (which can either on the localhost or a remote machine). " Does this mean that the sendmail binary is NOT needed on windows?
3
5940
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 :: Lite. Unfortunately i cannot use it . I have tried to write a program on my own to send 2 attachments and sending using perl sendmail but program is not working. It is reading only first file for attachment purposes and ignores second one.I would...
0
7947
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7880
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8374
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8242
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6665
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5413
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2389
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 we have to send another system
1
1486
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.