Author |
Message |
tangoman
Involved


Joined: Aug 06, 2005
Posts: 301
|
Posted:
Thu Aug 11, 2005 1:22 pm |
|
Yes Kevin...And I was happy that it was all working perfectly 24 hours ago. Did we do anything yesterday that would have affected the mail functionality?...I don't think we did. |
|
|
|
 |
tangoman

|
Posted:
Fri Aug 12, 2005 5:47 am |
|
Kevin,
I have tried replacing many files on the server, (one at a time), to see if the mailing function returns to the website, but this has not been sucessfull.
The above took much time too, so I am wondering if thereis a way I can check to see what the problem is, (like an error reporting log or something)?
I have given up trying to use the 'Feedback Form' facility just for now, because the problem of this function not working is clearly linked to the fact that the Newsletter function is also not working.
I am receiving no errors when I try to send a Newsletter, so again I am wondering if there may be a way to see what the problem is on an error log etc?
Any ideas? |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Fri Aug 12, 2005 6:07 am |
|
You can find some errors in the error.log (a text file that is generated or updated when errors occur). You can also see errors through your control panel, though I'm not sure what control panel Yahoo Small Business uses.
I recommend checking with Yahoo to find out why email sent by the PHP mail function stopped working. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
tangoman

|
Posted:
Fri Aug 12, 2005 6:34 am |
|
I do not see the error.log file. Which directory is it located in? |
|
|
|
 |
technocrat
Life Cycles Becoming CPU Cycles

Joined: Jul 07, 2005
Posts: 511
|
Posted:
Fri Aug 12, 2005 7:18 am |
|
It would be in your root |
_________________ 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! / Only registered users can see links on this board! Get registered or login! |
|
|
 |
tangoman

|
Posted:
Fri Aug 12, 2005 7:19 am |
|
|
|
 |
kguske

|
Posted:
Fri Aug 12, 2005 9:00 am |
|
I suggest again that you contact Yahoo. |
|
|
|
 |
tangoman

|
Posted:
Fri Aug 12, 2005 9:04 am |
|
I will do so Kevin...But I guess my thoughs are simply, 'why would the PHP mail stop working suddenly if I have not made any such changes to make it do so etc'?
You can understand my thougs, particularly when everything was working fine when we spoke.
Can you enlighten me to your aparent certainnes that there could be a problem at the host?...I mean, is this a comomn problem or something? |
|
|
|
 |
technocrat

|
Posted:
Fri Aug 12, 2005 9:09 am |
|
You can also try this outside of Nuke
Create a new php file for example mailtest.php
Put in this code
Code:<?php
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
|
Change nobody@example.com to be the email address you want to send to. You can do my address too if you want. Technocrat at platinummods.com
Then put it in your root and run it. http://www.yoururl.com/mailtest.php If mail goes out then it's something inside of nuke. If it doesnt then most likely a host problem. |
|
|
|
 |
tangoman

|
Posted:
Fri Aug 12, 2005 9:27 am |
|
Thanks Technocrat...
So I did exactly as you said.
I assume that to run the file I just had to open the URL up in a browser, (which gave a blanks screen).
No mail has been received at the $to address , hence I think Kevin 'won' this one!!!!...I am just 'sickened' that will all the added stress and problems I am having building this website and with the very short deadline I have to meet, that my host could now give me this greif to deal with!
Is this a common problem with hosts?...Again I ask simply because Kevin did apear to be sure that this could well be the problem, but at the same time I thought it unlikely if I had made no changes to my mail settings THAT I COULD RECALL. |
|
|
|
 |
technocrat

|
Posted:
Fri Aug 12, 2005 9:32 am |
|
I dont know if its a common problem. But I have had at least one host have this problem before. It was rather upsetting when your entire site cannot send any mail. |
|
|
|
 |
tangoman

|
Posted:
Fri Aug 12, 2005 9:40 am |
|
As I explained before, 48 hours ago EVERYTHING APPEARED to be working perfectly.
Then I noticed the site would not send using the Newsletter function and module, but Kevin helped me fix that...It was because the e-mail account on the server was not set up exactly as the one I have defined in Nuke Preferences.
I then continued again assuming everything was ok, but then yesterday was when I discovered that the Feedback From/Module was not sending mail. I did not think to relate this to the previous (Newsletter function) problem I had, because i assume that was working still.
It was only late yesterday that I tried to see if the Newsletter function was still working, but it was not, hence I realised that the problem must be common to the site and all mail functions.
You may think it a little radical, but after attempting to find out if I had made an erronious change to a file, I tried replacing certain files with 'new versions' from the Install pack. When this did not work, I began to reinstalled the whole of Nuke and this began just before your e-mail on how to test my host etc.
So now, once all the files are back on the server, I will test the Newsletter function one more time and if/when it fails to work, I will shout at Yahoo!, who are my hosting company!!! |
|
|
|
 |
tangoman

|
Posted:
Fri Aug 12, 2005 11:50 am |
|
Ok Guys...So the complete new install failed to work too!!!....d*** Yahoo!...d***! d***! d***! |
|
|
|
 |
technocrat

|
Posted:
Fri Aug 12, 2005 12:06 pm |
|
No offence but thats what you get with Yahoo!
You should try to find a better host provider. Since I dont think we are supposed to post hosts here, I can PM you with the one I use. Also Raven is a host provider. |
|
|
|
 |
tangoman

|
Posted:
Fri Aug 12, 2005 12:09 pm |
|
I understand...But as I am only just starting to use Nuke on my yahoo! webspace, I have not previously encountered any PHP problems. I have never had any issues with basic HTML being hosted on this space...Is PHP something 'different'?...Shold I expect more problems with certain hosts when they host PHP? |
|
|
|
 |
tangoman

|
Posted:
Sun Aug 14, 2005 2:55 am |
|
OK everyone...
So....'Sods law' kicked in when I originally brought this problem up, hence although I was making changes to code etc in order to rectify the problem, unknown to me, there was an additional problem of my host, (Yahoo!), having a fault on my account, which prevented ANY PHP mail from being sent.
The host problem has now been resolved, hence I am now back at point one.
The problem is still that a user is unable to send a message from my website, using the Feedback Form, uness they are registered.
I have replaced the Feedback Form file so the code is as though it has not been altered, then I made the change that 'technocrat' advised in his previous posting stamped 'Posted: Fri Aug 12, 2005 2:46 am'.
This change has still not helped matters, so where should I go from now?
I have not implemented the other suggestion by 'technocrat' in the posting stamped 'Fri Aug 12, 2005 4:37 am' becuase I am not sure what it is explaining specifically. It advises:
Find:
Code:
$to = $adminmail;
Before add:
Code:
global $adminmail;
Does this mean that above the existing line of code $to = $adminmail; , I should add the line: global $adminmail; ? |
|
|
|
 |
kguske

|
Posted:
Sun Aug 14, 2005 7:26 pm |
|
If you are able to send newsletters and your admin, preferences email address is defined on the server, visitors should be able to send Feedback. Do you see any error messages?
Please post or email your modules/Feedback/index.php file. |
|
|
|
 |
tangoman

|
Posted:
Sun Aug 14, 2005 7:54 pm |
|
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* Based on php Addon Feedback 1.0 */
/* Copyright (c) 2001 by Jack Kozbial */
/* http://www.InternetIntl.com */
/* jack@internetintl.com */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/* Additional security & Abstraction layer conversion */
/* 2003 chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
if ( !defined('MODULE_FILE') )
{
die("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
/**********************************/
/* Configuration */
/* */
/* You can change this: */
/* $index = 0; (right side off) */
/**********************************/
$index = 1;
$subject = "$sitename "._FEEDBACK."";
/**********************************/
include("header.php");
$cookie[0] = intval($cookie[0]);
if ($cookie[1] != "") {
$result = $db->sql_query("SELECT name, username, user_email FROM ".$user_prefix."_users WHERE user_id='".$cookie[0]."'");
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row['name'] != "") {
$sender_name = $row['name'];
} else {
$sender_name = $row['username'];
}
$sender_email = $row['user_email'];
}
$form_block = "
<center><font class=\"title\"><b>$sitename: "._FEEDBACKTITLE."</b></font>
<br><br><font class=\"content\">"._FEEDBACKNOTE."</font>
<FORM METHOD=\"post\" ACTION=\"modules.php?name=$module_name\">
<P><strong>"._YOURNAME.":</strong><br>
<INPUT type=\"text\" NAME=\"sender_name\" VALUE=\"$sender_name\" SIZE=30></p>
<P><strong>"._YOUREMAIL.":</strong><br>
<INPUT type=\"text\" NAME=\"sender_email\" VALUE=\"$sender_email\" SIZE=30></p>
<P><strong>"._MESSAGE.":</strong><br>
<TEXTAREA NAME=\"message\" COLS=30 ROWS=5 WRAP=virtual>$message</TEXTAREA></p>
<INPUT type=\"hidden\" name=\"opi\" value=\"ds\">
<P><INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\""._SEND."\"></p>
</FORM></center>
";
OpenTable();
if ($opi != "ds") {
echo "$form_block";
} elseif ($opi == "ds") {
if ($sender_name == "") {
$name_err = "<center><font class=\"option\"><b><i>"._FBENTERNAME."</i></b></font></center><br>";
$send = "no";
}
if ($sender_email == "") {
$email_err = "<center><font class=\"option\"><b><i>"._FBENTEREMAIL."</i></b></font></center><br>";
$send = "no";
}
if ($message == "") {
$message_err = "<center><font class=\"option\"><b><i>"._FBENTERMESSAGE."</i></b></font></center><br>";
$send = "no";
}
if ($send != "no") {
$sender_name = removecrlf($sender_name);
$sender_email = removecrlf($sender_email);
$msg = "This message was sent from the $sitename website\n\n";
$msg .= ""._SENDERNAME.": $sender_name\n";
$msg .= ""._SENDEREMAIL.": $sender_email\n\n";
$msg .= ""._MESSAGE.": $message\n\n";
$to = $adminmail;
$mailheaders = "From: $sender_name <$sender_email>\n";
$mailheaders .= "Reply-To: $sender_email\n\n";
mail($to, $subject, $msg, $mailheaders);
echo "<P><center>"._FBMAILSENT."</center></p>";
echo "<P><center>"._FBTHANKSFORCONTACT."</center></p>";
} elseif ($send == "no") {
OpenTable2();
echo "$name_err";
echo "$email_err";
echo "$message_err";
CloseTable2();
echo "<br><br>";
echo "$form_block";
}
}
CloseTable();
include("footer.php");
?> |
|
|
|
 |
kguske

|
Posted:
Sun Aug 14, 2005 8:40 pm |
|
This tested correctly on my server. But only after I made sure the administrator email was correct - that is the recipient.
If the administrator email is correct, it may be that Yahoo blocks mail being sent by users not on their system. Change this in the code:
Code://$mailheaders = "From: $sender_name <$sender_email>\n";
//$mailheaders .= "Reply-To: $sender_email\n\n";
$mailheaders = "From: $to <$to>\n";
$mailheaders .= "Reply-To: $to\n\n";
|
That will use the administrator email as the FROM address (as well as the TO address) and may get around that restriction. |
|
|
|
 |
tangoman

|
Posted:
Mon Aug 15, 2005 4:09 am |
|
Kevin,
I just read your last post, (stamped: Mon Aug 15, 2005 12:40 pm).
Is this advise INSTEAD of the previous advice and code give by 'tecnocrat', (stamped 'Fri Aug 12, 2005 2:46 am'), or IN ADDITION to it?
Currently I have made the changes as he advised. |
|
|
|
 |
kguske

|
Posted:
Mon Aug 15, 2005 5:50 am |
|
The timestamp you see in a posted message is RELATIVE to the time you have set in your profile. Thus 12:40 (my last post) to you is 9:40 to me. However, I could not find any post by technocrat at 11:46pm (that is, relative to your 2:46 am) comment.
Since I posted immediately after that, it would be reasonable to asssume that the changes are intended to be made to the code you posted.
The code you posted will work unless Yahoo is doing something like blocking email sent on its servers from domains not on that server. You can test this by using your administrator email as the address in the feedback (i.e., the feedback email will be sent FROM your administrator email address TO your administrator email address). PLEASE TEST THIS BEFORE MAKING FURTHER CHANGES OR POSTS.
If that test works, the code I posted allows you to change the sending / from email in the code you posted to address this limitation by Yahoo.
Assuming you are paying something for Yahoo's hosting "service," I also recommend that you request - from Yahoo - instructions on how to identify / review mail errors on your server. Yahoo should also be able to confirm that email sent using the PHP mail function with a From address (domain) not on the Yahoo server is blocked.
As I have tested the code you posted and it works correctly on my server, I cannot offer any other suggestions on this matter other than this: if you cannot get it to work using the code you provided or with the changes I suggested last, I strongly suggest - beg, implore, etc. - that you find another host. |
|
|
|
 |
tangoman

|
Posted:
Mon Aug 15, 2005 6:00 am |
|
kguske wrote: | ...You can test this by using your administrator email as the address in the feedback (i.e., the feedback email will be sent FROM your administrator email address TO your administrator email address). PLEASE TEST THIS BEFORE MAKING FURTHER CHANGES OR POSTS.... |
I made sure I was logged out of the Nuke User Account and performed the above.
IT WORKED!...In addition, I tried ANYTHING@MYDOMAIN.com and it also works.
Hmmm...Whats the deal with Yahoo! then?!...Whay do they place such restrictions on the users service?! Is there a valid reason?! F*@##rs!
Kevin, thanks again...I will soon try the new code you have suggested, but I will also 'give Yahoo! some grief' and interrigate them. |
|
|
|
 |
kguske

|
Posted:
Mon Aug 15, 2005 6:05 am |
|
They're doing that to prevent spammers from using their server. The changes I suggested should work AS LONG AS your administrator email is on the Yahoo server (i.e. on your domain). If you want to use a non-domain address for administration, just hard code a domain email address in the modules/Feedback/index.php. |
|
|
|
 |
tangoman

|
Posted:
Mon Aug 15, 2005 6:08 am |
|
kguske wrote: | ... just hard code a domain email address in the modules/Feedback/index.php... |
You mean type the address or some text with a hyper link?!
If you mean that, then this rookie was thinking of doing exactly that if I could not resolve the problem before the website goes live...As a temporary measure. |
|
|
|
 |
tangoman

|
Posted:
Mon Aug 15, 2005 11:45 am |
|
tangoman wrote: | kguske wrote: | ... just hard code a domain email address in the modules/Feedback/index.php... |
You mean type the address or some text with a hyper link?!
If you mean that, then this rookie was thinking of doing exactly that if I could not resolve the problem before the website goes live...As a temporary measure. |
Kevin...Was I correct with the last posting on this issue?...
I am just checking various functions on the website and I note now that if I use the 'Recommend this Site to a Friend' function, although the Nuke says the message has been sent, again it is not received. I am assuming this is the same problem as with the feedback from....Again, can you confirm if I am correect?!
If I am, do I assume that te e-mail problem will afffect any e-mail functions on the site, INCLUDING sending a registrants user info? |
|
|
|
 |
|