Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
dad7732
RavenNuke(tm) Development Team



Joined: Mar 18, 2007
Posts: 1242

PostPosted: Fri Jan 06, 2012 4:51 pm Reply with quote

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
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Sat Jan 07, 2012 6:32 am Reply with quote

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!
 
View user's profile Send private message
dad7732







PostPosted: Sat Jan 07, 2012 7:33 am Reply with quote

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.
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sat Jan 07, 2012 9:02 am Reply with quote

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! 
View user's profile Send private message Visit poster's website
dad7732







PostPosted: Sat Jan 07, 2012 9:05 am Reply with quote

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
 
dad7732







PostPosted: Sat Jan 07, 2012 9:24 am Reply with quote

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
 
kguske







PostPosted: Sat Jan 07, 2012 2:35 pm Reply with quote

Nice. Thanks for posting the followup
 
dad7732







PostPosted: Sat Jan 07, 2012 2:41 pm Reply with quote

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. Smile

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
 
montego







PostPosted: Sun Jan 08, 2012 8:48 am Reply with quote

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.
 
dad7732







PostPosted: Sun Jan 08, 2012 8:51 am Reply with quote

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
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©