Warning: Failed to Receive

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
net7
Forum Commoner
Posts: 31
Joined: Wed Mar 12, 2003 1:27 pm

Warning: Failed to Receive

Post by net7 »

the line is this :

Code: Select all

mail($recipient,$subject,$message);
they are all valid, and im sure the recipient is an email
User avatar
redhair
Forum Contributor
Posts: 300
Joined: Fri May 30, 2003 4:36 pm
Location: 53.23N-6.57E
Contact:

Post by redhair »

try $to
net7
Forum Commoner
Posts: 31
Joined: Wed Mar 12, 2003 1:27 pm

Post by net7 »

Err. how so?
User avatar
redhair
Forum Contributor
Posts: 300
Joined: Fri May 30, 2003 4:36 pm
Location: 53.23N-6.57E
Contact:

Post by redhair »

Thought that might work...
Just a wild guess.
So it didnt>?

Hmm...
$recipient is not valid, or mailbox dont work.
But you checked it all..ok. good luck.
Are you getting errors at all?
net7
Forum Commoner
Posts: 31
Joined: Wed Mar 12, 2003 1:27 pm

Post by net7 »

Yeah the error was the warning failed to recieve blah blah and it sent me to the line of mail()
net7
Forum Commoner
Posts: 31
Joined: Wed Mar 12, 2003 1:27 pm

Post by net7 »

I am using an apache server on my windows computer with php and mysql, ssl etc.. but maybe the mail isn't configured? how would I do this?
User avatar
redhair
Forum Contributor
Posts: 300
Joined: Fri May 30, 2003 4:36 pm
Location: 53.23N-6.57E
Contact:

Post by redhair »

There could be a number of reasons why email don't work.

For example my inet provider has a block on smtp port 25.
If thats the case with you, i'm affraid there is no other alternative then installing your own mail server.

If thats not the case...it could be a misconfig. in your php.ini.
Did you run a phpinfo on your server to see if everything is ok?
User avatar
redhair
Forum Contributor
Posts: 300
Joined: Fri May 30, 2003 4:36 pm
Location: 53.23N-6.57E
Contact:

Post by redhair »

Look at these lines in your php.ini, and change to correct vallues:

[mail function]
; For Win32 only.
SMTP = mail
; I have set it to 'mail', because thats the smtp server on my network.

; For Win32 only.
sendmail_from = you@home.nl
net7
Forum Commoner
Posts: 31
Joined: Wed Mar 12, 2003 1:27 pm

Post by net7 »

thanks it worked :)

actually im using my home email but i guess that's ok as im not going to actually host sites on this comp.
User avatar
redhair
Forum Contributor
Posts: 300
Joined: Fri May 30, 2003 4:36 pm
Location: 53.23N-6.57E
Contact:

Post by redhair »

Great :D
Post Reply