Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
08-24-2005, 10:55 PM
#1
LQ Newbie
Registered: May 2005
Location: Malaysia
Posts: 22
Rep:
php mail function
i had tried to make some changes in the configuration of sendmail ... but my php mail function still not working, didnt receive any email ... izzit can check the sendmail is working correctly ? can some1 show me the way ...
thnx alot ...
Last edited by akamaru607; 08-25-2005 at 12:58 AM .
08-25-2005, 12:22 AM
#2
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,371
Rep:
Maybe check the log (it's /var/log/maillog on my system), to see what's happening when mail is being sent?
08-25-2005, 12:29 AM
#3
LQ Newbie
Registered: May 2005
Location: Malaysia
Posts: 22
Original Poster
Rep:
it came out with this
-bash: /var/log/maillog: Permission denied
sorry, im totally new in linux ... wat wrong with tat ? anyway thanx
08-25-2005, 12:37 AM
#4
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,371
Rep:
Did you just type "/var/log/maillog" in a terminal? You need to open it with a text editor (as root). To become root, type "su" (without quotes) and then your root password when prompted. Then open the file with the name of the editor you want to use (emacs, vi, joe, kate, gedit, nano, pico, etc) followed by the filename, eg. "pico /var/log/maillog".
08-25-2005, 12:37 AM
#5
LQ Newbie
Registered: May 2005
Location: Malaysia
Posts: 22
Original Poster
Rep:
this is my php.ini
[mail function]
; For Win32 only.
SMTP = localhost.localdomain
smtp_port = 25
; For Win32 only.
;sendmail_from =
root@localhost.loca ldomain
then im testing with this php code ...
<?php
$to = 'dyer607@hotmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From:
webmaster@example.com ' . "\r\n" .
'Reply-To:
webmaster@example.com ' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
08-25-2005, 12:45 AM
#6
LQ Newbie
Registered: May 2005
Location: Malaysia
Posts: 22
Original Poster
Rep:
Aug 25 13:35:07 localhost sendmail[7721]: j7P5Z4UZ007721: to=mailman, ctladdr=mailman (41/41), delay=00:00:03, xdelay=00:00:03, mailer=relay, pri=30302, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j7P5Z5Ii007723 Message accepted for delivery)
Aug 25 13:35:08 localhost sendmail[7724]: j7P5Z5Ii007723: to=root, ctladdr=<mailman@localhost.localdomain> (41/41), delay=00:00:01, xdelay=00:00:01, mailer=local, pri=30839, dsn=2.0.0, stat=Sent
Aug 25 13:40:10 localhost sendmail[7811]: j7P5e9Ub007811: from=mailman, size=302, class=0, nrcpts=1, msgid=<200508250540.j7P5e9Ub007811@localhost.localdomain>, relay=mailman@localhost
Aug 25 13:40:15 localhost sendmail[7814]: j7P5eBtg007814: from=<mailman@localhost.localdomain>, size=584, class=0, nrcpts=1, msgid=<200508250540.j7P5e9Ub007811@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Aug 25 13:40:16 localhost sendmail[7811]: j7P5e9Ub007811: to=mailman, ctladdr=mailman (41/41), delay=00:00:07, xdelay=00:00:06, mailer=relay, pri=30302, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j7P5eBtg007814 Message accepted for delivery)
Aug 25 13:40:19 localhost sendmail[7818]: j7P5eBtg007814: to=root, ctladdr=<mailman@localhost.localdomain> (41/41), delay=00:00:04, xdelay=00:00:03, mailer=local, pri=30839, dsn=2.0.0, stat=Sent
this the some of it i copy ... wat should i check with the log file ? sorry on troubling u with this kind of Q, i really wish i can solve it in soon ...
08-25-2005, 12:45 AM
#7
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,371
Rep:
Quote:
Originally posted by akamaru607
this is my php.ini
[mail function]
; For Win32 only.
SMTP = localhost.localdomain
smtp_port = 25
; For Win32 only.
;sendmail_from = root@localhost.loca ldomain
Did you set those yourself? If so, you shouldn't have as they're for Windows only..
Edit: in your log file are there any lines that contain the address you're trying to send to,
dyer607@hotmail.com ?
Last edited by Nylex; 08-25-2005 at 12:47 AM .
08-25-2005, 12:50 AM
#8
LQ Newbie
Registered: May 2005
Location: Malaysia
Posts: 22
Original Poster
Rep:
ya, i set it, i not really understand with those README ... so izzit anything wrong with tat
? im using fedora 3 ...
08-25-2005, 12:52 AM
#9
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,371
Rep:
Well it clearly says "For Win32 only" and since you're using Linux..
Edit: also, don't use "HELP !!!" in thread titles, it won't help your thread get more attention.
Last edited by Nylex; 08-25-2005 at 12:55 AM .
08-25-2005, 12:55 AM
#10
LQ Newbie
Registered: May 2005
Location: Malaysia
Posts: 22
Original Poster
Rep:
-_-" omg ... i really din notice that ... so this following this need to set something ?
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t -i
Last edited by akamaru607; 08-25-2005 at 12:57 AM .
08-25-2005, 12:57 AM
#11
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,371
Rep:
If that's the path to your sendmail, leave it as it is, unless you want to use different arguments (see "man sendmail" for details of those).
08-25-2005, 01:00 AM
#12
LQ Newbie
Registered: May 2005
Location: Malaysia
Posts: 22
Original Poster
Rep:
okok, go n hav a look now ... anyway thanx u so much !!!
08-25-2005, 01:06 AM
#13
LQ Newbie
Registered: May 2005
Location: Malaysia
Posts: 22
Original Poster
Rep:
oh yah Nylex, can u help me on this problem
"/bin/sh: mailman: command not found"
wat is the problem ?
08-25-2005, 01:08 AM
#14
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,371
Rep:
The problem is either that you don't have "mailman" installed, or that the path to its executable isn't in your $PATH environment variable.
08-25-2005, 01:35 AM
#15
LQ Newbie
Registered: May 2005
Location: Malaysia
Posts: 22
Original Poster
Rep:
there is a executable mailman in /usb/lib/mailman/mail ... if it isn't in the $PATH environment variable ... so what should i do ?
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 04:59 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News