Hi guys,
I'm trying to use mail() PHP function, the function is working fine but I don't receive any email. I have LINUX box(fedora 11) and sendmail service is working fine. If you need any config files, I would be happy to provide you with.
Thanks in advance.
Mail function doesn't workLinux Box
Page 1 of 1
10 Replies - 1100 Views - Last Post: 25 August 2009 - 07:45 AM
Replies To: Mail function doesn't work
#2
Re: Mail function doesn't work
Posted 24 August 2009 - 09:18 AM
Please post your php code.
I suggest you use something simple to start:
I suggest you use something simple to start:
<?php
mail("required","info","as","text");
#3
Re: Mail function doesn't work
Posted 24 August 2009 - 09:28 AM
I use the mail() function as the following:-
I think that is the simplest way to use it, without mime or any additional headers.
<?php $to="ex@domain.com"; $subject="Test"; $body="Blah, Blah, Blah"; mail($to,$subject,$body,'From:admin@domain.com'); ?>
I think that is the simplest way to use it, without mime or any additional headers.
#4
Re: Mail function doesn't work
Posted 24 August 2009 - 10:12 AM
Try using "yourusername@localhost" as the recipient. If you receive that, then the php is working, but probably blocked by your isp.
#5
Re: Mail function doesn't work
Posted 24 August 2009 - 03:29 PM
mail() will not work on a localhost eg xampp or wampp or whatever, so if youre trying to do that then it wont work
get a free host if you have too
get a free host if you have too
#6
Re: Mail function doesn't work
Posted 24 August 2009 - 04:00 PM
It works on mine! Maybe it doesn't work on Windows, but it should work on *nix systems.
#7
Re: Mail function doesn't work
Posted 25 August 2009 - 03:38 AM
hmmm, CT ive read in lots of places that the mail function wont work on a localhost. ive never tried it i just accepted it. is there anyone that could clarify this ?
#8
Re: Mail function doesn't work
Posted 25 August 2009 - 03:52 AM
mail() works fine on *nix mainly because SMTP gets installed in a standard install for a *nix OS and it is achieveable with free software for windows
#9
Re: Mail function doesn't work
Posted 25 August 2009 - 03:56 AM
You have to install SMTP Server, try looking in google for it http://www.google.co...ree+smtp+server
#10
Re: Mail function doesn't work
Posted 25 August 2009 - 05:08 AM
Thanks guys for all the replies. Actually, I tried that script yesterday and I received nothing. I tried to send emails to my yahoo and gmail accounts but like I said I got nothing. I checked my inbox at yahoo and gmail today, I received all the emails I sent yesterday. I tried again and sent emails today to yahoo and gmail and I received them instantly.
Any ideas what may caused that. By the way I run fedora 11 on my computer.
Thanks
Any ideas what may caused that. By the way I run fedora 11 on my computer.
Thanks
#11
Re: Mail function doesn't work
Posted 25 August 2009 - 07:45 AM
might just have got caught up a little bit. i dont know how it works but ive had to wait several hours for email before, it just happens every so often.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|