Author |
Message |
dad7732
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Mar 18, 2007
Posts: 1242
|
Posted:
Fri Jan 06, 2012 4:51 pm |
|
Running with PHP 5.2.17 and RN 2.4.0.1
When trying to use PHP Mail() it doesn't work, nothing mailed. But I don't think it's a problem with RN but rather the version of PHP maybe and something either missing or not configured properly in PHP.INI [mail function]
I have a script that returns mail failed, the script:
Code:
<?php
// A test script for sending mail. Put your email address below
// and open this script in your browser.
$ADDR = "me@myserver.com";
if (mail($ADDR,"Testing","This is a test"))
echo "Mail function succeeded<br />";
else
echo "Mail function FAILED<br />";
?>
|
Any ideas would be appreciated.
Cheers |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Sat Jan 07, 2012 6:32 am |
|
Mail is probably blocked on your server. Try using TegoNuke mailer with SMTP |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dad7732
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jan 07, 2012 7:33 am |
|
Oh, I can use smtp no problem, just testing to see if the php mail works and it doesn't. I've tried several different scripts from the php forums to no avail. I have a ticket in to my provider but like you I think it's blocked for spammer purposes. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sat Jan 07, 2012 9:02 am |
|
If you can use SMTP, then dollars-to-donuts the issue is your host has shut off this function as kguske has suggested. I would be surprised if they opened it back up.
If you have a script that is running under RavenNuke(tm) but not yet TegoNuke(tm) Mailer "aware", there are a lot of good examples within the existing modules (such as News and Submit News) which will help you convert. If you need help... just shout. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dad7732
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jan 07, 2012 9:05 am |
|
TegoNuke works just fine as does all mailer functions using SMTP in RN, was just testing to see if php mail worked because my scripts don't work.
Cheers |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dad7732
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jan 07, 2012 9:24 am |
|
I found the problem, so here we go with the solution:
Since php mail relies on SMTP localhost and apache@mydomain.com is the localhost, mail wasn't being sent because of the following:
In my /etc/mail/virtusertable there was the entry:
apache@mydomain.com error:nouser User unknown
Changing that to:
apache@mydomain.com me (known user email address)
And then from the command line:
#vnewvirtmaps
All the scripts now work.
The rest of Saturday will be a wonderful day ... at least until the next problem arrives. ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jan 07, 2012 2:35 pm |
|
Nice. Thanks for posting the followup |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dad7732
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jan 07, 2012 2:41 pm |
|
This is something in RN that has been bugging me for ages when php mail() didn't work. A client on my server had a php form that didn't work and this got me in high gear or else.
Hope somebody else with the problem will read this and get it working for them as well. I learned something about how it works. Don't know everything but I'm working on it. ![RTM](modules/Forums/images/smiles/icon_read.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jan 08, 2012 8:48 am |
|
dad7732, people rarely have access to the internals, so didn't even know you could. Definitely thanks on the follow-up. Glad you got it sorted. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dad7732
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jan 08, 2012 8:51 am |
|
I have full access to my two servers. If someone is having the same problem at least they have some handle on it to convey to their provider.
The older I get the smaller the thinking cap becomes, yes it was quite a challenge.
Cheers |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|