LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 08-01-2005, 02:31 PM   #1
delamatrix
Member
 
Registered: Nov 2004
Posts: 43

Rep: Reputation: 15
sendmail problem in Suse 9.2


I'm running Suse Professional 9.2 with apache 2, php4, and sendmail installed. I'm trying to implement a simple email form where a user enters their email and a remark and when they click submit, the form data is emailed to me. I think I have the html and php file correct, but the form info is never emailed to me. Could this be a problem with sendmail. Here is my code:

***HTML FILE***

<form method="post" action="sendmail.php">
Email: <input name="email" type="text" /><br />
Message:<br />
<textarea name="message" rows="15" cols="40">
</textarea><br />
<input type="submit" />
</form>

***HTML FILE***


***PHP FILE***

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

mail( "nobody@free.org", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.nobody.com/index.html" );
?>

***PHP FILE***

Is there anything I'm doing wrong with the code, or is there a certain way to configure sendmail? I checked to see if sendmail was running and it was. Any help would be appreciated.

Thanks,

Delamatrix
 
Old 08-02-2005, 09:22 AM   #2
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
The code looks fine.

Have you tried putting a print_r($_REQUEST); command in to see whether the PHP page is actually receiving what the user types in?

Is the SMTP server set up correctly in php.ini? Also, is the mail command returning true or false? (This should indicate whether it's succeeding at sending the mail).

There shouldn't be any special configuration of sendmail required.
 
Old 08-02-2005, 12:45 PM   #3
delamatrix
Member
 
Registered: Nov 2004
Posts: 43

Original Poster
Rep: Reputation: 15
1.) Putting --> print_r($_REQUEST); <-- in the code works.

2.) In the php.ini file, I found the following line:

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

******************

Should I type the path to sendmai there?


3.) The following message is created in /var/log/mail log file:

Aug 2 12:31:30 serena sendmail[5905]: j72HVUwc005905: from=wwwrun, size=95, class=0, nrcpts=1, msgid=<200508021731.j72HVUwc005905@serena.goldroq.local>, relay=wwwrun@localhost

Aug 2 12:31:32 serena sendmail[5906]: j72HVUZL005906: from=<wwwrun@serena.goldroq.local>, size=328, class=0, nrcpts=1, msgid=<200508021731.j72HVUwc005905@serena.goldroq.local>, proto=ESMTP, daemon=Daemon0, relay=localhost [127.0.0.1]

Aug 2 12:31:32 serena sendmail[5905]: j72HVUwc005905: to=golden@cnt.org, ctladdr=wwwrun (30/8), delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=30095, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j72HVUZL005906 Message accepted for delivery)

Aug 2 12:31:33 serena sendmail[5908]: j72HVUZL005906: to=<golden@cnt.org>, ctladdr=<wwwrun@serena.goldroq.local> (30/8), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120328, relay=mailbox.cnt.org. [68.20.235.7], dsn=2.0.0, stat=Sent (Ok: queued as 705A02D9B)


Anything looks suspicious here?

- Delamatrix
 
Old 08-02-2005, 04:10 PM   #4
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
Yeah, put the path to sendmail in the php.ini file. You'll have to restart the httpd service to get it to reload the file. If it helps, on my system sendmail is /usr/sbin/sendmail.

Quote:
Anything looks suspicious here?
Not obviously - but I'm not a sendmail expert.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail on Suse 8 schirayu Linux - Software 1 06-07-2005 03:15 AM
SuSe 9.1 Pro/Sendmail/Setup/Problem DataLore Linux - Software 0 08-10-2004 03:48 AM
Sendmail Problem on SuSe 8.1 sjuerges Linux - Newbie 2 12-01-2003 12:08 AM
problem processing sendmail.mc to sendmail.cf ...help... lucastic Linux - Networking 1 09-21-2003 10:08 AM
suse 8.1 postfix or sendmail adix Linux - General 0 08-25-2003 05:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 12:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration