Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 05-15-2005, 06:23 PM   #1
Registered: Sep 2004
Location: Sweden
Distribution: Slackware, Gentoo!
Posts: 115

Rep: Reputation: 15
What is wrong with my mail script?(PHP)

i cant get it to work threw the shell or the web

PHP Code:
"Message received, message ignored";


Old 05-15-2005, 07:43 PM   #2
LQ Newbie
Registered: Feb 2003
Location: Bay Area
Distribution: RH 8.0
Posts: 10

Rep: Reputation: 0
How exactly does the page fail?

Have you setup the code to the precise specifications:

You might also try setting the email address and subject as variables:

PHP Code:
$email "";    
$subject "The subject line";

mail$email$subject$thetext$headers ); 
Setting things up in this fashion has gotten me past odd script errors.
Old 05-16-2005, 04:18 AM   #3
Registered: Dec 2003
Location: Bangkok- Thailand
Distribution: Mandriva 10.0,Fedora Core 4
Posts: 79

Rep: Reputation: 15

$message = "Message received, message ignored";

mail('','Hey', $message);

It 's right syntax! but not work why?
Have you tried send mail to localhost yet?
If it 's still not work ,I think it cuase your sendmail or postfix setting


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
PHP Website with e-mail forms, what mail daemon? gbkyle Linux - Software 1 07-05-2005 12:33 PM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 11:51 AM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 06:06 PM
CGI Script runs to send mail, but mail is never sent robertwo Linux - Newbie 2 06-10-2004 09:57 AM
php mail script return path richard22 Linux - Software 1 08-22-2003 04:10 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:39 AM.

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