Results 1 to 5 of 5

Contact Us page not sending email

This is a discussion on Contact Us page not sending email within the osCMax v2 Features Discussion forums, part of the osCmax v2.0 Forums category; I am not getting any emails from my contact us page. All other site generated emails seem to work fine, ...

      
  1. #1
    Member
    Join Date
    Nov 2005
    Location
    Central Texas
    Posts
    38
    Rep Power
    0


    Default Contact Us page not sending email

    I am not getting any emails from my contact us page. All other site generated emails seem to work fine, it is JUST the contact page that is not sending emails to me. Anyone else run into this problem? Please help, fix needed fast!
    I hope it is not something stupid that I am missing.

  2. #2
    Member
    Join Date
    Nov 2005
    Location
    Central Texas
    Posts
    38
    Rep Power
    0


    Default RE: Contact Us page not sending email

    ANYONE!?!?!?!!? Please help!!

    Server OS: Linux 2.4.29-rc1-20051109a
    Database: MySQL 4.0.25-standard-log
    HTTP Server: Apache/1.3.33 (Unix)
    PHP Version: 4.4.1 (Zend: 1.3.0)

    contact_us.php code follows:

    <?php
    /*
    $Id: contact_us.php,v 1.3.2.1.2.2 2005/09/21 20:57:16 Michael Sasek Exp $

    osCMax Power E-Commerce
    http://oscdox.com

    Copyright (c) 2003 osCommerce

    Released under the GNU General Public License
    */

    // Most of this file is changed or moved to BTS - Basic Template System - format.
    // For adding in contribution or modification - parts of this file has been moved to: catalog\templates\fallback\contents\<filename>. tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).
    // catalog\templates\fallback\contents\<filename>. tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).
    // (Sub 'fallback' with your current template to see if there is a template specific file.)

    require('includes/application_top.php');

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);

    // BOF: Added
    $_POST['email'] = preg_replace( "/\n/", " ", $_POST['email'] );
    $_POST['name'] = preg_replace( "/\n/", " ", $_POST['name'] );
    $_POST['email'] = preg_replace( "/\r/", " ", $_POST['email'] );
    $_POST['name'] = preg_replace( "/\r/", " ", $_POST['name'] );
    $_POST['email'] = str_replace("Content-Type:","",$_POST['email']);
    $_POST['name'] = str_replace("Content-Type:","",$_POST['name']);
    // EOF: Added

    $error = false;
    if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) {
    $name = tep_db_prepare_input($HTTP_POST_VARS['name']);
    $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
    $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

    if (tep_validate_email($email_address)) {

    tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);
    tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));
    } else {
    $error = true;
    $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
    $enquiry = "";
    $name = "";
    $email = "";
    }
    }

    $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));

    $content = CONTENT_CONTACT_US;

    include (bts_select('main', $content_template)); // BTSv1.5

    require(DIR_WS_INCLUDES . 'application_bottom.php');
    ?>

    contact_us.tpl.php code follows:

    <?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
    <td class="pageHeading" align="right"></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    </tr>
    <?php
    if ($messageStack->size('contact') > 0) {
    ?>
    <tr>
    <td><?php echo $messageStack->output('contact'); ?></td>
    </tr>
    <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    </tr>
    <?php
    }

    if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
    ?>
    <tr>
    <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td>
    </tr>
    <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    </tr>
    <tr>
    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    <tr class="infoBoxContents">
    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr>
    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    <?php
    } else {
    ?>
    <tr>
    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    <tr class="infoBoxContents">
    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr>
    <td class="main"><?php echo ENTRY_NAME; ?></td>
    </tr>
    <tr>
    <td class="main"><?php echo tep_draw_input_field('name'); ?></td>
    </tr>
    <tr>
    <td class="main"><?php echo ENTRY_EMAIL; ?></td>
    </tr>
    <tr>
    <td class="main"><?php echo tep_draw_input_field('email'); ?></td>
    </tr>
    <tr>
    <td class="main"><?php echo ENTRY_ENQUIRY; ?></td>
    </tr>
    <tr>
    <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    </tr>
    <tr>
    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    <tr class="infoBoxContents">
    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr>
    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    <?php
    }
    ?>
    </table></form>

  3. #3
    Member
    Join Date
    Jun 2005
    Posts
    50
    Rep Power
    0


    Default RE: Contact Us page not sending email

    Huh, just tried it on my two new OSCMAX V2.0 RC2 sites that I started over the holidays, and guess what - it doesn't work! Guess I'll try to look into this and try and get it figured out, but first I'll check the BugTracker to see if anything's been posted there.

  4. #4
    Member
    Join Date
    Jun 2005
    Posts
    50
    Rep Power
    0


    Default RE: Contact Us page not sending email

    OK - got it to work. Here's the fix (at least it made my two store send e-mail that didn't work previously)

    (1) Go to your ADMIN panel and login
    (2) Click the CONFIGURATION link
    (3) Click on the 3rd line for the EMAIL ADDRESS
    (4) Change the format of the e-mail address so that it represents JUST the address and nothing else. Mine were previously in the format:

    <My Name and Store> myname@mystore.com

    and I changed it to just:

    myname@mystore.com

    and now is sends me e-mail!

    Hope this works for you as well.

    John

  5. #5
    Member
    Join Date
    Nov 2005
    Location
    Central Texas
    Posts
    38
    Rep Power
    0


    Default RE: Contact Us page not sending email

    Should have known it would be some stupid little thing It worked for me too. My sincere thanks to you John. If this is a widely accepted solution, maybe it should become a sticky.

Similar Threads

  1. Problem when sending email by SMTP
    By oling in forum osCmax v2 Installation issues
    Replies: 2
    Last Post: 04-11-2008, 11:25 AM
  2. problem with sending email to customers
    By joanstead in forum osCMax v2 Features Discussion
    Replies: 3
    Last Post: 02-18-2006, 08:10 AM
  3. Help with Paypal IPN. Not emptying cart, not sending email.
    By typhus in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 01-24-2006, 04:05 AM
  4. adding to the contact up page?
    By Kristine in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 03-25-2004, 04:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •