Bjorn2004 Posted June 2, 2004 Posted June 2, 2004 I have a problem. I'm changing servers right now, and have installed a OScommerce, I have imported my old db and everything seems right, if you look apart for the email problems. When a customer signs up, no email are sent out When a customer orders, no email are sent out (not store owner, or customer) When customer click on "Contact us" and "email sent" is shown on screen, I recive nothing. What have I been doing wrong?? :rolleyes:
batteryrat Posted June 2, 2004 Posted June 2, 2004 you must have and incorect email address in the store owner Vertical Climb watch me loose grip an plumit!!
Bjorn2004 Posted June 2, 2004 Author Posted June 2, 2004 everything is the same as on the old site :(
batteryrat Posted June 2, 2004 Posted June 2, 2004 did you not change servers? Vertical Climb watch me loose grip an plumit!!
Bjorn2004 Posted June 2, 2004 Author Posted June 2, 2004 yes I have installed the Oscommerce on my new webhotell, and everything is just the way it was before (all preferences etc), but emails are not comming trough the systeme!
vasttech Posted June 2, 2004 Posted June 2, 2004 Does your new server support sendmail or smtp? If you switched from *nix to windows or vice versa you will probably need to change these settings. Also, check to see who you have send e-mail from set to. osCommerce Knowledge Base osCommerce Documentation Contributions
Guest Posted June 2, 2004 Posted June 2, 2004 I dont remember who wrote this to give them credit, put this into the your catalog folder then execute it, it sends two emails, one via server email other via oscommerce code, can help identify where the errors are at. <?php if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'send')) { define('SEND_EMAILS', 'true'); if (isset($HTTP_POST_VARS['usehtml']) && ($HTTP_POST_VARS['usehtml'] == '1')) { define('EMAIL_USE_HTML', 'true'); } else { define('EMAIL_USE_HTML', 'false'); } } require('includes/application_top.php'); if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'send')) { mail($HTTP_POST_VARS['to_address'], ' ' . $HTTP_POST_VARS['subject'], 'This email has been sent from the native php mail() function.' . "\n\n" . $HTTP_POST_VARS['body']); tep_mail($HTTP_POST_VARS['to'], $HTTP_POST_VARS['to_address'], '[osCommerce] ' . $HTTP_POST_VARS['subject'], 'This email has been sent from the email class osCommerce uses.' . "\n\n" . $HTTP_POST_VARS['body'], $HTTP_POST_VARS['from'], $HTTP_POST_VARS['from_address']); echo 'E-Mails Sent!<br><br>'; }?><form name="emailtest" action="email_test.php" method="post">E-Mail From: <?php echo tep_draw_input_field('from'); ?><br>E-Mail From Address: <?php echo tep_draw_input_field('from_address'); ?><br><br>E-Mail To: <?php echo tep_draw_input_field('to'); ?><br>E-Mail To Address: <?php echo tep_draw_input_field('to_address'); ?><br><br>Subject: <?php echo tep_draw_input_field('subject'); ?><br><br>Body:<br><?php echo tep_draw_textarea_field('body', 'virtual', 50, 7); ?><br><br><?php echo tep_draw_checkbox_field('usehtml', '1'); ?> Send as HTML (overrides the Administration Tool setting)<br><br><input type="hidden" name="action" value="send"><input type="submit"><br><br><input type="reset"></form>
Guest Posted June 2, 2004 Posted June 2, 2004 i had the sameproblem here when i changed server removing extra mailadresses and adding them again solved the problem here. :wacko:
donthecat Posted June 2, 2004 Posted June 2, 2004 I dont remember who wrote this to give them credit, put this into the your catalog folder then execute it, it sends two emails, one via server email other via oscommerce code, can help identify where the errors are at. <?php if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'send')) { define('SEND_EMAILS', 'true'); if (isset($HTTP_POST_VARS['usehtml']) && ($HTTP_POST_VARS['usehtml'] == '1')) { define('EMAIL_USE_HTML', 'true'); } else { define('EMAIL_USE_HTML', 'false'); } } require('includes/application_top.php'); if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'send')) { mail($HTTP_POST_VARS['to_address'], ' ' . $HTTP_POST_VARS['subject'], 'This email has been sent from the native php mail() function.' . "\n\n" . $HTTP_POST_VARS['body']); tep_mail($HTTP_POST_VARS['to'], $HTTP_POST_VARS['to_address'], '[osCommerce] ' . $HTTP_POST_VARS['subject'], 'This email has been sent from the email class osCommerce uses.' . "\n\n" . $HTTP_POST_VARS['body'], $HTTP_POST_VARS['from'], $HTTP_POST_VARS['from_address']); echo 'E-Mails Sent!<br><br>'; }?><form name="emailtest" action="email_test.php" method="post">E-Mail From: <?php echo tep_draw_input_field('from'); ?><br>E-Mail From Address: <?php echo tep_draw_input_field('from_address'); ?><br><br>E-Mail To: <?php echo tep_draw_input_field('to'); ?><br>E-Mail To Address: <?php echo tep_draw_input_field('to_address'); ?><br><br>Subject: <?php echo tep_draw_input_field('subject'); ?><br><br>Body:<br><?php echo tep_draw_textarea_field('body', 'virtual', 50, 7); ?><br><br><?php echo tep_draw_checkbox_field('usehtml', '1'); ?> Send as HTML (overrides the Administration Tool setting)<br><br><input type="hidden" name="action" value="send"><input type="submit"><br><br><input type="reset"></form> Hi , I just wanted to know which file this code should go into. Thanks --- DontheCat --- Obviously the truth is what's so Not so obviously, it's also so what.
vasttech Posted June 7, 2004 Posted June 7, 2004 Create a new file and copy the code to it. Put that new file into the catalog directory and goto http://www.your-domain-name-here.com/catal...ed_the_file.php osCommerce Knowledge Base osCommerce Documentation Contributions
gurmeetm Posted June 7, 2004 Posted June 7, 2004 Tried this no emails still sent... I dont get any errors which is very wierd. Its telling me emails sent. But nothing ever comes into my inbox.
vasttech Posted June 7, 2004 Posted June 7, 2004 Are you on a Unix-based server? If so try going to admin->configuration->email options set the email transport method to sendmail. If you are using smtp you may have to add a line to your php.ini file to point the correct smtp server. If your host does not allow you to edit your php.ini file directly you can add the following line to application_top.php to do that: $setsmtpsrvr = ini_set('SMTP', 'your-mail-server-here'); osCommerce Knowledge Base osCommerce Documentation Contributions
gurmeetm Posted June 7, 2004 Posted June 7, 2004 I am on a UNIX server running Apache. Hosted with www.intermedia.net I tried adding this to the Applicationtop.php file but no luck... $setsmtpsrvr = ini_set('SMTP', 'your-mail-server-here');
vasttech Posted June 7, 2004 Posted June 7, 2004 What is transport method are using to send e-mails? osCommerce Knowledge Base osCommerce Documentation Contributions
Guest Posted June 14, 2004 Posted June 14, 2004 I had the same problem with suse and we ran the updates and all was good. however on my windows 2K server with vertual SMTP and apache with OSC 2.2 2 and it will only send e-mail to the users when they place order, it will not send to the store owner. this only worked after I put the code talked about here on the *top.php in both admin and catalog. any ideas? is there another file I need to do this for?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.