Results 1 to 5 of 5
  1. #1

    Default $email_message_html

    $EMAIL_MESSAGE_HTML is all I get in emails I receive from my link submission mod. I have asked the mod developer and he doesn't know. Any help here? I have fixed this before on my Contact Us page, but for the life of me, I can't remember what I did!

  2. #2
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: $email_message_html

    Make sure you have the following paragraph in your includes/modules/pages/contact_us/header_php.php:

    // Prepare extra-info details
    $extra_info = email_collect_extra_info($name, $email_address, $customer_name, $customer_email);
    // Prepare Text-only portion of message
    $text_message = OFFICE_FROM . "\t" . $name . "\n" .
    OFFICE_EMAIL . "\t" . $email_address . "\n\n" .
    '------------------------------------------------------' . "\n\n" .
    strip_tags($_POST['enquiry']) . "\n\n" .
    '------------------------------------------------------' . "\n\n" .
    $extra_info['TEXT'];
    // Prepare HTML-portion of message
    $html_msg['EMAIL_MESSAGE_HTML'] = strip_tags($_POST['enquiry']);
    $html_msg['CONTACT_US_OFFICE_FROM'] = OFFICE_FROM . ' ' . $name . '<br />' . OFFICE_EMAIL . '(' . $email_address . ')';
    $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
    // Send message
    zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us');
    and that your enquiry entry has been added from your includes/templates/<your_template>/templates/tpl_contact_us_default.php file where it should say:

    PHP Code:
    <label for="enquiry"><?php echo ENTRY_ENQUIRY '<span class="alert">' ENTRY_REQUIRED_SYMBOL '</span>'?></label>
    <?php echo zen_draw_textarea_field('enquiry''30''7''''id="enquiry"'); ?>
    From your email/email_template_contact_us.html file:

    PHP Code:
    <!-- Content Section -->
      <
    div class="content">
        <
    div>$CONTACT_US_OFFICE_FROM<hr /></div>
        <
    div>$EMAIL_MESSAGE_HTML</div>
      </
    div
    ;)

  3. #3

    Default Re: $email_message_html

    Sorry, I never got that anyone replied to this and am still working to find an answer. This is great for my contact us, but that's working. This is for the link submit mod and the mail that gets sent out once someone submits a link. The code from /includes/modules/pages/links_submit/header.php is

    <?php
    //
    // +----------------------------------------------------------------------+
    // |zen-cart Open Source E-commerce |
    // +----------------------------------------------------------------------+
    // | Copyright (c) 2003 The zen-cart developers |
    // | |
    // | http://www.zen-cart.com/index.php |
    // | |
    // | Portions Copyright (c) 2003 osCommerce |
    // +----------------------------------------------------------------------+
    // | This source file is subject to version 2.0 of the GPL license, |
    // | that is bundled with this package in the file LICENSE, and is |
    // | available through the world-wide-web at the following url: |
    // | http://www.zen-cart.com/license/2_0.txt. |
    // | If you did not receive a copy of the zen-cart license and are unable |
    // | to obtain it through the world-wide-web, please send a note to |
    // | [email protected] so we can mail you a copy immediately. |
    // +----------------------------------------------------------------------+
    // Original contrib by Vijay Immanuel for osCommerce, converted to zen by [email protected] - http://www.open-operations.com
    // $Id: links_manager.php 2006-12-22 Clyde Jones
    //
    require(DIR_WS_MODULES . 'require_languages.php');
    require(DIR_WS_FUNCTIONS . 'links.php');
    $process = false;
    if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
    $process = true;
    $links_title = zen_db_prepare_input($HTTP_POST_VARS['links_title']);
    $links_url = zen_db_prepare_input($HTTP_POST_VARS['links_url']);
    $links_category = zen_db_prepare_input($HTTP_POST_VARS['links_category']);
    $links_description = zen_db_prepare_input($HTTP_POST_VARS['links_description']);
    $links_image = zen_db_prepare_input($HTTP_POST_VARS['links_image']);
    $links_contact_name = zen_db_prepare_input($HTTP_POST_VARS['links_contact_name']);
    $links_contact_email = zen_db_prepare_input($HTTP_POST_VARS['links_contact_email']);
    if (SUBMIT_LINK_REQUIRE_RECIPROCAL == 'true') {
    $links_reciprocal_url = zen_db_prepare_input($HTTP_POST_VARS['links_reciprocal_url']);
    }
    $error = false;
    if (strlen($links_title) < ENTRY_LINKS_TITLE_MIN_LENGTH) {
    $error = true;
    $messageStack->add('submit_link', ENTRY_LINKS_TITLE_ERROR);
    }
    if (strlen($links_url) < ENTRY_LINKS_URL_MIN_LENGTH) {
    $error = true;
    $messageStack->add('submit_link', ENTRY_LINKS_URL_ERROR);
    }
    if (strlen($links_description) < ENTRY_LINKS_DESCRIPTION_MIN_LENGTH) {
    $error = true;
    $messageStack->add('submit_link', ENTRY_LINKS_DESCRIPTION_ERROR);
    }
    if (strlen($links_contact_name) < ENTRY_LINKS_CONTACT_NAME_MIN_LENGTH) {
    $error = true;
    $messageStack->add('submit_link', ENTRY_LINKS_CONTACT_NAME_ERROR);
    }
    if (strlen($links_contact_email) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
    $error = true;
    $messageStack->add('submit_link', ENTRY_EMAIL_ADDRESS_ERROR);
    } elseif (zen_validate_email($links_contact_email) == false) {
    $error = true;
    $messageStack->add('submit_link', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
    }
    if (SUBMIT_LINK_REQUIRE_RECIPROCAL == 'true') {
    if (strlen($links_reciprocal_url) < ENTRY_LINKS_URL_MIN_LENGTH) {
    $error = true;
    $messageStack->add('submit_link', ENTRY_LINKS_RECIPROCAL_URL_ERROR);
    }
    }
    if ($error == false) {
    if($links_image == 'http://') {
    $links_image = '';
    }
    // default values
    $links_date_added = 'now()';
    $links_status = '1'; // Pending approval
    $links_rating = '0';
    $sql_data_array = array('links_url' => $links_url,
    'links_image_url' => $links_image,
    'links_contact_name' => $links_contact_name,
    'links_contact_email' => $links_contact_email,
    'links_reciprocal_url' => $links_reciprocal_url,
    'links_date_added' => $links_date_added,
    'links_status' => $links_status,
    'links_rating' => $links_rating);
    zen_db_perform(TABLE_LINKS, $sql_data_array);
    $links_id = zen_db_insert_id();
    $categories = $db->Execute("select link_categories_id from " . TABLE_LINK_CATEGORIES_DESCRIPTION . " where link_categories_name = '" . $links_category . "' and language_id = '" . (int)$_SESSION['languages_id'] . "' ");
    $link_categories_id = $categories->fields['link_categories_id'];
    $db->Execute("insert into " . TABLE_LINKS_TO_LINK_CATEGORIES . " (links_id, link_categories_id) values ('" . (int)$links_id . "', '" . (int)$link_categories_id . "')");
    $language_id = (int)$_SESSION['languages_id'];
    $sql_data_array = array('links_id' => $links_id,
    'language_id' => $language_id,
    'links_title' => $links_title,
    'links_description' => $links_description);
    zen_db_perform(TABLE_LINKS_DESCRIPTION, $sql_data_array);
    // build the message content
    $name = $links_contact_name;
    $email_text = sprintf(EMAIL_GREET_NONE, $links_contact_name);
    $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
    $email_store_text .= EMAIL_OWNER_TEXT . $links_title . "\n" . $links_url . "\n" . $links_description;
    zen_mail($name, $links_contact_email, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
    zen_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_OWNER_SUBJECT, $email_store_text, $name, $links_contact_email);
    zen_redirect(zen_href_link(FILENAME_LINKS_SUBMIT_SUCCESS, '', 'SSL'));
    }
    }
    // links breadcrumb
    if($_SESSION['customer_id']) {
    $check_customer = $db->Execute("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'");
    $email= $check_customer->fields['customers_email_address'];
    $name= $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'];
    }

    $breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_LINKS, '', 'NONSSL'));
    if (isset($HTTP_GET_VARS['lPath'])) {
    $link_categories_value = $db->Execute("select * from " . TABLE_LINK_CATEGORIES_DESCRIPTION . " where link_categories_id = '" . (int)$HTTP_GET_VARS['lPath'] . "' and language_id = '" . (int)$_SESSION['languages_id'] . "' ");
    $breadcrumb->add($link_categories_value->fields['link_categories_name'], zen_href_link(FILENAME_LINKS, 'lPath=' . $link_categories_value->fields['link_categories_id'], 'NONSSL'));
    }
    $breadcrumb->add(NAVBAR_TITLE_2);
    $_SESSION['navigation']->remove_current_page();
    ?>



    Does anything here need to be changed? Thanks so much for your help!

  4. #4

    Default Re: $email_message_html

    OK, I tried all the above things and submitted a link each time to generate the email. Nothing changed until I did the last thing. But now the email says:
    $LINK_SUBMIT_OFFICE_FROM
    --------------------------------------------------------------------------------

    $EMAIL_GREETING
    $EMAIL_WELCOME
    $EMAIL_MESSAGE_HTML
    $EMAIL_CONTACT_OWNER
    $EMAIL_CLOSURE



    I created a file called email_template_links_submit.html (the mod didn't come with this file, but I was told in another thread that this needed to be done) and this is the code in it:


    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <base href="$BASE_HREF" />

    <style type="text/css">
    .body {background-color:#ffffff; color:#000000; font-family:Verdana, Arial, Helvetica, sans-serif;}
    a:link {color:#0066cc;}
    a:hover {background-color:#eeeecc; color:#0066cc;}
    a:visited {color:#0066cc;}
    .holder {background-color:#f9f9f9; border:1px solid #9a9a9a; font-size:9px; text-align:left; width:550px;}
    .header {font-size:10px; padding:0px; width:550px;}
    .content {font-size:10px; padding:5px; width:550px;}
    .content-line {padding:5px;}
    .coupon-block {padding:5px; border:1px solid #cccccc; background-color: #FFFF99;}
    .coupon-code {font-weight:bold;}
    .gv-block {padding:5px; border:1px solid #cccccc; background-color: #99FF99;}
    .gv-code {font-weight:bold;}
    .footer {border-top:1px solid #9a9a9a; font-size:9px; margin-top:10px; text-align:center; width:550px;}
    .extra-info {background-color:#cccc99; border:1px solid #9a9a9a; font-size:10px; margin-top:10px; padding:5px; width:550px;}
    .extra-info-bold {font-weight:bold;}
    .disclaimer {background-color:#f9f9f9; border:1px solid #cccccc; font-size:10px; margin-top:10px; padding:5px; width:550px;}
    .disclaimer1 {color:#666666; padding:5px;}
    .disclaimer1 a:link {color:#666666;}
    .disclaimer1 a:visited {color:#666666;}
    .disclaimer2 {color:#666666; padding:5px}
    .copyright {border-bottom:0px solid #9a9a9a; padding:5px;}
    </style>

    </head>

    <body class="body">
    <div class="holder">

    <!-- Header Section -->
    <div class="header">
    <img src="email/header.jpg" alt="logo" />
    </div>


    <!-- Content Section -->
    <div class="content">
    <div>$LINK_SUBMIT_OFFICE_FROM<hr /></div>
    <div class="content-line">$EMAIL_GREETING</div>
    <div class="content-line">$EMAIL_WELCOME</div>
    <!--The following only get populated if they're enabled! -->
    $COUPON_BLOCK
    $GV_BLOCK
    <!-- end gv/coupon section -->
    <div>$EMAIL_MESSAGE_HTML</div>
    <div class="content-line">$EMAIL_CONTACT_OWNER<br />$EMAIL_CLOSURE</div>
    </div>
    </div>

    <!-- Footer Section -->
    <div class="footer">
    <div class="copyright">$EMAIL_FOOTER_COPYRIGHT</div>
    </div>

    <div class="disclaimer">
    <div class="disclaimer1">$EMAIL_DISCLAIMER</div>
    <div class="disclaimer2">$EMAIL_SPAM_DISCLAIMER</div>
    </div>
    $EXTRA_INFO
    </body>
    </html>

    Not sure what else to tinker with!
    Amy

  5. #5
    Join Date
    Nov 2006
    Location
    Papworth, Cambridgeshire, UK
    Posts
    731
    Plugin Contributions
    3

    Default Re: $email_message_html

    $EMAIL_MESSAGE_HTML is the system keyword in the email stylesheets for the HTML text body of an email. The message being sent.
    See here
    https://www.zen-cart.com/tutorials/i...hp?article=113

    You also do not say whether you are talking about the link submitter email, the store admin email, or both.
    All this means is that no message text has been defined in $EMAIL_MESSAGE_HTML, since the messages being sent are in $email_text and $email_store_text - see the two lines with zen_mail in them in your 09:33 post above.

 

 

Similar Threads

  1. EXTRA CC ORDER info = $EMAIL_MESSAGE_HTML
    By MeltDown in forum General Questions
    Replies: 14
    Last Post: 12 Apr 2007, 08:33 AM
  2. $email_message_html
    By Danielle in forum General Questions
    Replies: 1
    Last Post: 18 Nov 2006, 10:56 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR