View Full Version : 0.6.3 Contact Seller Email Failure

19-11-2008, 09:21 PM
The following error is received when attempting to contact the seller:

Warning: main(/usr/local/psa/home/vhosts/mysticalgolf.com/httpdocs/auction/includes/send_email.EN.inc.php) [function.main]: failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/mysticalgolf.com/httpdocs/auction/send_email.php on line 85

Warning: main() [function.include]: Failed opening '/usr/local/psa/home/vhosts/mysticalgolf.com/httpdocs/auction/includes/send_email.EN.inc.php' for inclusion (include_path='.:/usr/local/psa/apache/share/pear') in /usr/local/psa/home/vhosts/mysticalgolf.com/httpdocs/auction/send_email.php on line 85

Haven't quite figure out yet what it should be.

19-11-2008, 10:11 PM
in send_email.php
include $include_path."send_email.".$USERLANG.".inc.php";

include $main_path."language/".$USERLANG."/send_email.inc.php";

19-11-2008, 11:37 PM
That might work, but there is no send_email.inc.php in language\EN and I cannot find it anywhere. But I had a lot of fun remembering how to turn the /'s into \'s for my windows box :D

Any idea where that file may be located at?

20-11-2008, 04:22 PM
After a bit of comtemplation, found an easy fix starting at line 85 insert the following :

//include $include_path."send_email.".$USERLANG.".inc.php";
$FROM ="From: $_POST[sender_email]";
$SUBJECT ="Question about your auction item ". $item_title." on ".$SETTINGS['sitename'];
$MESSAGE =$SUBJECT. "\n\n". $_POST[sender_name]." has the following question \n\n ". $_POST[sender_question]."\n\n Send response to ".$_POST[sender_email];
$MESSAGE .="\n\n ----------- \n Posted at ". $time." from ".$SETTINGS['sitename']." located at ".$SETTINGS['siteurl']." \n";

Of course the message could be tweaked a bit more if desired, but this solves the problem enough for me.

20-11-2008, 06:08 PM
nice work around wmshay, thanks. This will work till the mod gets fixed.

20-11-2008, 06:28 PM
ahh i found the send_email.inc.php file i must of deleted it at some point

if(!defined('INCLUDED')) exit("Access denied");
/************************************************** *************************
* copyright : (C) 2008 WeBid
* site : http://sourceforge.net/projects/simpleauction
************************************************** *************************/

/************************************************** *************************
* 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, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
************************************************** *************************/

$FROM = "From:$SETTINGS[sitename] <$SETTINGS[adminmail]>\n"."Content-Type: text/html; charset=$CHARSET";
$TO = stripslashes($seller_email);
$SUBJECT = $MSG_650;
$MESSAGE = "Hello $seller_nick,

This message is sent from $SETTINGS[sitename].

<#s_name#> at <#sender_email#> ('<#sender_email#>') has a question for you regarding your auction $item_title.



Auction URL: ".$SETTINGS['siteurl']."item.php?id=".$auction_id." ('".$SETTINGS[')

Thank you for be part of $SETTINGS[sitename]

<#c_siteurl#> ('<#c_siteurl#>')


$MESSAGE = ereg_replace("<#s_name#>","$_POST[sender_name]",$MESSAGE);
$MESSAGE = ereg_replace("<#s_email#>","$_POST[sender_email]",$MESSAGE);
$MESSAGE = ereg_replace("<#s_comment#>","$sender_comment",$MESSAGE);
$MESSAGE = ereg_replace("<#sender_question#>","$_POST[sender_question]",$MESSAGE);
$MESSAGE = ereg_replace("<#sender_email#>","$_POST[sender_email]",$MESSAGE);
$MESSAGE = ereg_replace("<#c_sitename#>",$SETTINGS[sitename],$MESSAGE);
$MESSAGE = ereg_replace("<#c_siteurl#>",$SETTINGS[siteurl],$MESSAGE);


20-11-2008, 08:27 PM
That almost worked ren. I got the following after it printed the email on the browser screen.

', 'Question:')You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mailto:jmorris1161@yahoo.com'>jmorris1161@yahoo.com has a question for you r' at line 1

Good thing though, it did send the email but had an issue writing the message to the DB it looks like.

Also you have a typo in there, it says "thank you for be part of" maybe it should be "thank you for being a part of"

20-11-2008, 11:28 PM
$sql = "INSERT INTO ".$DBPrefix."messages( `sentto` , `from` , `when` , `message` , `subject` ) VALUES ('$seller_id', '$userid', '$time', '".$MESSAGE."', '".$SUBJECT."')";

$sql = "INSERT INTO ".$DBPrefix."messages( `sentto` , `from` , `when` , `message` , `subject` ) VALUES ('$seller_id', '$userid', '$time', '".addslashes($MESSAGE)."', '".addslashes($SUBJECT)."')";

i think that should work

20-11-2008, 11:46 PM
Worked like a charm. The subject just says "Question:" but it did go through. Thanks