Guest Posted June 12, 2007 Share Posted June 12, 2007 guys, still not working here. Question: do i have to include the quotes in the inc file? Or do i leave them out? Is there someone who could post a working example? What i did was this in my email.php: ==================== // begin smtp authentication include(DIR_WS_INCLUDES . '/classes/class.smtp.inc'); $params['host'] = '10.0.0.1'; // The smtp server host/ip $params['port'] = 25; // The smtp server port $params['helo'] = '10.0.0.1'; // What to use when sending the helo command. Typically, your domain/hostname $params['auth'] = TRUE; // Whether to use basic authentication or not $params['user'] = 'gast'; // Username for authentication $params['pass'] = '****'; // Password for authentication $send_params['recipients'] = array("$to_addr"); // The recipients (can be multiple) $send_params['headers'] = array("From: $from", "To: $to_addr", "Subject: $subject"); $send_params['from'] = ''; // This is used as in the MAIL FROM: cmd // It should end up as the Return-Path: header $send_params['body'] = "$this->output"; // The body of the email is_object($smtp = smtp::connect($params)) AND $smtp->send($send_params); // end smtp authentication ======================== and the following in my class.smtp.inc file: ============================== ***************************************/ function smtp($params = array()){ if(!defined('CRLF')) define('CRLF', "\r\n", TRUE); $this->authenticated = FALSE; $this->timeout = 5; $this->status = SMTP_STATUS_NOT_CONNECTED; $this->host = '10.0.0.1'; $this->port = 25; $this->helo = 'localhost'; $this->auth = TRUE; $this->user = 'gast'; $this->pass = '****'; $this->errors = array(); foreach($params as $key => $value){ $this->$key = $value; } } /*************************************** ======================== Link to comment Share on other sites More sharing options...
Guest Posted June 12, 2007 Share Posted June 12, 2007 Forget it, it WORKS!!!! yahooooo finally, an iisreset (in commandbox) did the trick --> php.ini initialized because of the changed settings: ================ [mail function] ; For Win32 only. SMTP=10.0.0.1 smtp_port=25 ; For Win32 only. sendmail_from = info@****.nl ================== thanks for all the help Link to comment Share on other sites More sharing options...
Guest Posted June 12, 2007 Share Posted June 12, 2007 bllehhhhh, my conclusions to soon..... but i'm a step closer. Now I do receive e-mail that a customer has made an order, but the customer does not receive any? Is this an other php file i need to edit? Link to comment Share on other sites More sharing options...
iperez_genius Posted June 13, 2007 Share Posted June 13, 2007 everyone i have a problem...my self I can send emails as the admin through the email tool, I can get my password sent to me if i, as a customer forgot it, but when i put an order through i receive this error Fatal error: Cannot redeclare class smtp in /home/wwwprin/public_html/cart/includes/classes/class.smtp.inc on line 12 the order processes and i even receive an email but the error appears. Any ideas why this would be? Ilan Link to comment Share on other sites More sharing options...
iperez_genius Posted June 13, 2007 Share Posted June 13, 2007 everyone i have a problem...my selfI can send emails as the admin through the email tool, I can get my password sent to me if i, as a customer forgot it, but when i put an order through i receive this error Fatal error: Cannot redeclare class smtp in /home/wwwprin/public_html/cart/includes/classes/class.smtp.inc on line 12 the order processes and i even receive an email but the error appears. Any ideas why this would be? Ilan what i had to do to fix this problem was to put this line include(DIR_WS_INCLUDES . '/classes/class.smtp.inc'); in the application_top.php file, I did this in both the user side and application side Link to comment Share on other sites More sharing options...
iperez_genius Posted June 13, 2007 Share Posted June 13, 2007 New problem My admin is not recieving the emails now... any ideas? Link to comment Share on other sites More sharing options...
iperez_genius Posted June 13, 2007 Share Posted June 13, 2007 so here is what i have done to install this fix. I copied the class.smtp.inc file into includes/classes AND admin/includes/classes i then added this code...(in red) to the email.php in the same directory in both the admin and root directory if (EMAIL_TRANSPORT == 'smtp') { // return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers)); // begin smtp authentication $params['host'] = 'mail.xyz.com.au'; // The smtp server host/ip $params['port'] = 25; // The smtp server port $params['helo'] = 'xyz.com.au'; // What to use when sending the helo command. Typically, your domain/hostname $params['auth'] = TRUE; // Whether to use basic authentication or not $params['user'] = '[email protected]'; // Username for authentication $params['pass'] = '1234'; // Password for authentication $send_params['recipients'] = array("$to_addr"); // The recipients (can be multiple) $send_params['headers'] = array("From: $from", "To: $to_addr", "Subject: $subject"); $send_params['from'] = ''; // This is used as in the MAIL FROM: cmd // It should end up as the Return-Path: header $send_params['body'] = "$this->output"; // The body of the email is_object($smtp = smtp::connect($params)) AND $smtp->send($send_params); // end smtp authentication } else { return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers)); } the result is that i recieve email as a customer but as an admin i don't...can anyone explain why or how to fix the problem Have i installed this correctly? Ilan Link to comment Share on other sites More sharing options...
Guest Posted June 14, 2007 Share Posted June 14, 2007 what i had to do to fix this problem was to put this line include(DIR_WS_INCLUDES . '/classes/class.smtp.inc'); in the application_top.php file, I did this in both the user side and application side removed it from email.php and put it in application_top.php, but no solution. problem is that the smtp variable is declared twice. --> when i change if (EMAIL_TRANSPORT == 'smtp') { in if (EMAIL_TRANSPORT == 'SMTP') { error is gone, but the e-mail is not send to both.... Who is able to change the inc file?? Link to comment Share on other sites More sharing options...
zeeshop Posted June 19, 2007 Share Posted June 19, 2007 rheuvink did u manage to fix your problem, I am getting same error as yours one: Fatal error: Cannot redeclare class smtp in C:\Program Files\xampp\htdocs\includes\classes\class.smtp.php on line 12 Please advise me what u dont to fix, No pronlem in sending from any where else (Admin or live store) but when i go to update order or order status error above is comming. Please admise me some thing with your experience, regards zee Link to comment Share on other sites More sharing options...
Guest Posted June 19, 2007 Share Posted June 19, 2007 rheuvinkdid u manage to fix your problem, I am getting same error as yours one: Fatal error: Cannot redeclare class smtp in C:\Program Files\xampp\htdocs\includes\classes\class.smtp.php on line 12 Please advise me what u dont to fix, No pronlem in sending from any where else (Admin or live store) but when i go to update order or order status error above is comming. Please admise me some thing with your experience, regards zee yes i did, the solution was to put it on the END of the file application_top.php, just before the last line: ?> in both the catalog and admin side. do not forget to remove the line (include(DIR_WS_INCLUDES . '/classes/class.smtp.inc');) from the original file!! succes!!! Link to comment Share on other sites More sharing options...
zeeshop Posted June 19, 2007 Share Posted June 19, 2007 yes i did, the solution was to put it on the END of the file application_top.php, just before the last line: ?> in both the catalog and admin side.do not forget to remove the line (include(DIR_WS_INCLUDES . '/classes/class.smtp.inc');) from the original file!! succes!!! Hi Rheuvink Thanks for your prompt reply, Really gratefull for your help. It's all fixed from my side as I followed your instruction. Now email system is working in all links. Only problem i am facing now is Contact us page. When i was using Local Smtp server there was no problem, whenever customer filled contact us form i just reply him by presing reply button and got his email address on recieptent bar. but since I set External SMTP to send email, when customer send me any request filling Contact us page, I am not getting his email address to reply. reply address is my store address, Kindly give me any suggestion and fix for this problem. Thanks and regards zee Link to comment Share on other sites More sharing options...
MrsZippy Posted June 19, 2007 Share Posted June 19, 2007 Hello There I've been following these instructions for the last few days trying to get this email thing working but so far its to no avail :( I have uploaded the smtp.inc file to both locations, I have edited the email.php files and inserted the data as instructed. I am now getting a "email sent" success message when emailing a customer thro the shop but the email is not being received <_< I did try making the changes regarding the application_top.php but all i got was errors so i reverted back. Any ideas as what to do next? Any clues as to how to get this working :-" Smile: A curve that can make a million things straight Link to comment Share on other sites More sharing options...
tgilles Posted July 7, 2007 Share Posted July 7, 2007 Hello There I've been following these instructions for the last few days trying to get this email thing working but so far its to no avail :( I have uploaded the smtp.inc file to both locations, I have edited the email.php files and inserted the data as instructed. I am now getting a "email sent" success message when emailing a customer thro the shop but the email is not being received <_< I did try making the changes regarding the application_top.php but all i got was errors so i reverted back. Any ideas as what to do next? Any clues as to how to get this working :-" Same here, says successful, but no email - same results using origonal code. This is on Windows bases servers. Any other resolutions/ideas? Link to comment Share on other sites More sharing options...
nauwgi Posted July 13, 2007 Share Posted July 13, 2007 Hello, I have the same problem as some of the other people. I downloaded the correct smtp.zip file and changed the class.smtp.inc file in both admin\include\classes and include\classes according to the recommendations. I don't receive an error message when I want to sent a mail using the administration tool. In fact the system tells me that message has been sent but it never ends up in the receivers mailbox. :'( Anyone can shed some light on this? Link to comment Share on other sites More sharing options...
nauwgi Posted July 13, 2007 Share Posted July 13, 2007 Hello, I have the same problem as some of the other people. I downloaded the correct smtp.zip file and changed the class.smtp.inc file in both admin\include\classes and include\classes according to the recommendations.I don't receive an error message when I want to sent a mail using the administration tool. In fact the system tells me that message has been sent but it never ends up in the receivers mailbox. :'( Anyone can shed some light on this? Sending mail from the admin page now works fine. I just found out that my provider doesn't require validation when sending mail. I took it out and now I can send mail to one person on the list. Multiple destinations still end up with an error and when ordering an article, the confirmation email isn't received by the shop owner.. I believe I saw some comments on these errors in this thread, so will try and find the solution via those.. Link to comment Share on other sites More sharing options...
rsi2005 Posted August 7, 2007 Share Posted August 7, 2007 Quick Fix. 1) -> osCommerce Admin -> Configuration -> My Store Parameter: Email From Correct: [email protected] Wrong: Sales <[email protected]> 2) -> osCommerce Admin -> Configuration -> E-mail Options Parameter: E-mail Transport Method Correct: SMTP Wrong: Sendmail Parameter: Send E-mails must be set to true Link to comment Share on other sites More sharing options...
rsi2005 Posted August 7, 2007 Share Posted August 7, 2007 E-Mail Transport Method Defines if this server uses a local connection to sendmail or uses an SMTP connection via TCP/IP. Servers running on Windows and MacOS should change this setting to SMTP. Link to comment Share on other sites More sharing options...
phillife76 Posted August 13, 2007 Share Posted August 13, 2007 E-Mail Transport MethodDefines if this server uses a local connection to sendmail or uses an SMTP connection via TCP/IP. Servers running on Windows and MacOS should change this setting to SMTP. Hi, please pardon my stupidity here. I had tried to search for the place for me to filled in those STMP authentication portion on my php files but i had both email.php and mail.php in my folder. But i totally do not see the aprt that i can add in my smtp authentication details. Or am i suppose to open and edit the class.smtp.inc file and save it in my folders? Please advice. Thanks Link to comment Share on other sites More sharing options...
phillife76 Posted August 13, 2007 Share Posted August 13, 2007 Sorry i had overlook the steps. So i have to edit the email.php file. But what abt the class.smtp.inc? do i copy the text and edit it with textpad and save it as class.smtp.php or still save it as class.smtp.inc? please advice. Link to comment Share on other sites More sharing options...
phillife76 Posted August 13, 2007 Share Posted August 13, 2007 Managed to get the email running. Thanks. Link to comment Share on other sites More sharing options...
pedrodr Posted August 16, 2007 Share Posted August 16, 2007 Hola, que tal,espero me puedas ayudar con una tienda de oscommerse ya instale la tienda, y estoy trabajando en windows, pero al momento de crear un nuevo usuario, me manda el siguiente error, Warning: mail() has been disabled for security reasons in C:\Domains\mydominio.com\wwwroot\catalog\includes\classes\email.php on line 500 Warning: Cannot modify header information - headers already sent by (output started at C:\Domains\mudominio.com\wwwroot\catalog\includes\classes\email.php:500) in C:\Domains\mydominio.com\wwwroot\catalog\includes\functions\general.php on line 31 mi correo es : [email protected] ojala me puedas ayudar... saludos go to you windows subdirectory find php.ini edit the mail part and your oscommerce shopping cart mail works, this only work with user that are hosting them self under windows 2003 server. that work for me Link to comment Share on other sites More sharing options...
NashvilleDan Posted August 20, 2007 Share Posted August 20, 2007 Oh, man, have I messed up bigtime... First I couldn't figure out where these .inc files were... so I just downloaded them to my desktop, edited them, and uploaded them to the indicated directories... then they just disappeared. I don't see them with my .ftp software... (can you tell I just learn this stuff on the fly?) I've been building my store over the past two weeks and have it ready to run, EXCEPT for it wouldnt mail out emails... so I was trying to get that fixed... thus I'm here... So after uploading the .inc files, and the email.php files... now my store has TOTALLY DISAPPEARED!!!! I mean, I still get to the admin site, but the STORE itself is gone!! I just won't open up! And I don't know what happened! I have gone back and tried to UNDO everything that I DID installing this email "solution" but to no avail! HELP!! I'll gladly pay for someone to assist with this one! I've got to get my store up and running! Dan Link to comment Share on other sites More sharing options...
NashvilleDan Posted August 20, 2007 Share Posted August 20, 2007 Oh, man, have I messed up bigtime... First I couldn't figure out where these .inc files were... so I just downloaded them to my desktop, edited them, and uploaded them to the indicated directories... then they just disappeared. I don't see them with my .ftp software... (can you tell I just learn this stuff on the fly?) I've been building my store over the past two weeks and have it ready to run, EXCEPT for it wouldnt mail out emails... so I was trying to get that fixed... thus I'm here... So after uploading the .inc files, and the email.php files... now my store has TOTALLY DISAPPEARED!!!! I mean, I still get to the admin site, but the STORE itself is gone!! I just won't open up! And I don't know what happened! I have gone back and tried to UNDO everything that I DID installing this email "solution" but to no avail! HELP!! I'll gladly pay for someone to assist with this one! I've got to get my store up and running! Dan I finally VERY CAREFULLY retraced my steps and deleted everything... and my store re-appeared! WOW... SCAREY!!!!! Two weeks of work GONE! Now, is there a kind soul who can help me figure this thing out? Or is this thread dead? Link to comment Share on other sites More sharing options...
suhy Posted August 23, 2007 Share Posted August 23, 2007 Hi All, I also have BIG troubles getting SMTP to work as my provider just canceled sendmail support due to higher safety they say ... Anyway, I was trying quite a lot with various SMTP contributions and nothing worked so far. I so far successfuly implemented many many contribs and lots more difficult too, so I just don't know how to proceed here ... This forum thread is the last I encountered and as I can see many of you managed to fix it. Please read bellow questions and plz try to answer, so I can finally put my mind to rest :wacko: ... - As few of you I also get "Mail sent OK ", but nothing happens .... mail is not delivered ... - What is with include ... class.smtp.inc in application top ? Is this neccessary ? If one of you who managed to get it work post the complete procedure it would be just GREAT !!! (w00t) Thanks for any additional HELP ! Link to comment Share on other sites More sharing options...
imusorka Posted August 30, 2007 Share Posted August 30, 2007 Doesn't work for me either. Tried everything mentioned in this thread. Could those who got it to work share with others, please? :( Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.