The Mother Board

Motherboards.org forums. Free tech support, motherboard ID, and more.
It is currently Thu Sep 20, 2018 4:38 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sat Oct 02, 2004 5:40 pm 
Offline
Green Belt
Green Belt

Joined: Wed Jul 14, 2004 12:51 pm
Posts: 141
I am trying to get the mail function to work I am getting this error: Fatal error: Call to undefined function mail() in /www/register.php on line 37
on line 37 I have this:
Code:
mail ($_POST['email'], 'Thank You for registering!', $body, 'From: ''.phorum_html_encode('abranaugh@gmail.com').''');


I know it has to do with my php.ini file so my quesiton is what shall i put into the php.ini file? I am using Linux by the way.

Thank You
Adam.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Oct 02, 2004 6:37 pm 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14301
Location: Maine
Why do you have 2 double qoutes at the end of the line??? Having a single quote at the beginning and a double quote at the end will result in errors being displayed...

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Oct 02, 2004 6:46 pm 
Offline
Green Belt
Green Belt

Joined: Wed Jul 14, 2004 12:51 pm
Posts: 141
I think the problem is that I just copied it from another forum where I posted the same message but don't get responces until days later, this is what is really on line 37
Code:
mail ($_POST['email'], 'Thank You for registering!', $body, 'From: abranaugh@gmail.com');


By the way I am using PHP 5 with Apache2.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Oct 02, 2004 6:59 pm 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14301
Location: Maine
I'll direct MoboCop to this thread. He knows PHP a lot better then I do.

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Oct 02, 2004 11:00 pm 
Offline
Drunken Master

Joined: Tue Jan 18, 2000 1:01 am
Posts: 8854
Location: Fresno
strange message mail() is a php function. Not sure how it cannot be defined.

_________________
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Oct 02, 2004 11:11 pm 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14301
Location: Maine
MoboCop wrote:
strange message mail() is a php function. Not sure how it cannot be defined.
to have it defined you have to have quotes, brackets, etc. in the correct place and the correct type, correct?

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Oct 03, 2004 6:23 am 
Offline
Green Belt
Green Belt

Joined: Wed Jul 14, 2004 12:51 pm
Posts: 141
I think the reason its not working is because I don't have sendmail set up, I downloaded it from sendmail.org. I don't understand the readme file and how to install it, could someone held me please?

EDIT: Got it installed, should i just leave the php.ini file under sendmail_path blank? what should I put in it?

Don't get the error message anymore, doesnt' send the email though.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Oct 03, 2004 3:19 pm 
Offline
Green Belt
Green Belt

Joined: Wed Jul 14, 2004 12:51 pm
Posts: 141
Ok, I am trying it with Kmail now, I can send out of kmail with going to compose but still not sending me any email when I run the script. Here is my php.ini file of the mail function:
Code:
[mail function]
; For Win32 only.
SMTP = smtp.charter.net
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
sendmail_path = /usr/bin/kmail -t -i
sendmail_from = abranaugh@gmail.com
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Oct 03, 2004 6:31 pm 
Offline
Drunken Master

Joined: Tue Jan 18, 2000 1:01 am
Posts: 8854
Location: Fresno
the mail function is defined in php. If you call it wrong you will get missing parameter errors. If you put incorrect quotes you will get a parse errror.

I dont understand the mail() function not being defined. Unless it is perhaps turned off in php.ini? I dont even know if this is possible. Mail function has always worked for me straight out of the default installation.

what errors are you getting now?

_________________
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 04, 2004 1:24 pm 
Offline
Green Belt
Green Belt

Joined: Wed Jul 14, 2004 12:51 pm
Posts: 141
MoboCop wrote:
the mail function is defined in php. If you call it wrong you will get missing parameter errors. If you put incorrect quotes you will get a parse errror.

I dont understand the mail() function not being defined. Unless it is perhaps turned off in php.ini? I dont even know if this is possible. Mail function has always worked for me straight out of the default installation.

what errors are you getting now?


none not sending the email thats all.
I found out kmail is like a outlook express so I have to use send mail.
Can soemone help me out and help me setup sendmail so that i can actually sendmail? When I try sendmail abranaugh@gmail.com
talkdsfal
<ctrl d>
I get the following error: collect: Cannot write ./dfi94LkS1n005864 (bfcommit, uid=1002, gid=251): Permission denied
queueup: cannot create queue file ./qfi94LkS1n005864, euid=1002: Permissiondenied


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group