zarren Posted May 23, 2007 Posted May 23, 2007 Hey people :rolleyes: I have a small problem, I'm running a heavily modded version of oscommerce and cannot get my store to email customers with there new registration details. Here is the code in question: // build the message content $pw="ABCDEFGHJKMNOPQRSTUVWXYZabcdefghjkmnopqrstuvwxyz0123456789"; srand((double)microtime()*1000000); for ($i=1;$i<=5;$i++){ $Pass .= $pw{rand(0,strlen($pw)-1)}; } $pw1="ABCDEFGHJKMNOPQRSTUVWXYZabcdefghjkmnopqrstuvwxyz0123456789"; srand((double)microtime()*1000000); for ($i=1;$i<=5;$i++){ $Pass_neu .= $pw1{rand(0,strlen($pw1)-1)}; } $id = $customer_id; tep_db_query('update customers set customers_validation_code = "' . $Pass . $Pass_neu . '" where customers_id = "' . $id . '"'); $name = $firstname . ' ' . $lastname; if (ACCOUNT_GENDER == 'true') { if ($gender == 'm') { $email_text = sprintf(EMAIL_GREET_MR, $lastname); } else { $email_text = sprintf(EMAIL_GREET_MS, $lastname); } } else { $email_text = sprintf(EMAIL_GREET_NONE, $firstname); } if (sizeof($navigation->snapshot) > 0) { $woher_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); $woher_href = explode("?", $woher_href); $woher_href = explode(".php", $woher_href[0]); $woher_href = explode("/", $woher_href[0]); $woher_href = $woher_href[sizeof($woher_href)-1]; $woher_href = '&woher=' . $woher_href; } else { $woher_href = ''; } $email_text .= "\n" . MAIL_VALIDATION . "\n" . '<a href="' . tep_href_link('pw.php', 'action=reg&pass=' . $Pass . $Pass_neu . '&id=' . $id, 'SSL', false) . '">' . VALIDATE_YOUR_MAILADRESS . '</a>' . "\n" . "\n" . '(' . SECOND_LINK . ' ' . tep_href_link('pw.php', 'action=reg&pass=' . $Pass . $Pass_neu . '&id=' . $id, 'SSL', false) . ' )' . "\n" . "\n". OR_VALIDATION_CODE . $Pass . $Pass_neu . "\n" . "\n"; tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL')); } } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); Can anybody help?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.