Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Email problem!


Bjorn2004

Recommended Posts

Posted

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:

Posted

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!

Posted

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>

Posted

i had the sameproblem here when i changed server removing extra mailadresses and adding them again solved the problem here. :wacko:

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

Posted

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.

Posted

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');

Posted

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');

Posted

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...