Jump to content

E-mail destination address


louis12

Recommended Posts

Good day,

 

Please could someone assist, as I am working on a advertising / listing website and I would like to change the e-mail destination on a contact form for listings.

 

I believe it is currently set to send the request to the User's e-mail address, that posted / uploaded the listing. Would like to change it in order for all "Contact Seller" requests to be sent to an administrator e-mail address only.

 

I am not sure where I could enter the administrator's e-mail address in order for it to work. I have tried finding it below:

 

osc_enqueue_script('jquery-validate');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="<?php echo str_replace('_', '-', osc_current_user_locale()); ?>">
    <head>
        <?php osc_current_web_theme_path('head.php'); ?>
        <meta name="robots" content="noindex, nofollow" />
        <meta name="googlebot" content="noindex, nofollow" />
    </head>
    <body>
        <?php osc_current_web_theme_path('header.php'); ?>
        <div class="content user_forms">
            <div id="contact" class="inner">
                <h1><?php _e('Contact seller', 'modern'); ?></h1>
                <ul id="error_list"></ul>
                <?php ContactForm::js_validation(); ?>
                <form action="<?php echo osc_base_url(true); ?>" method="post" name="contact_form" id="contact_form">
                    <fieldset>
                        <?php ContactForm::primary_input_hidden(); ?>
                        <?php ContactForm::action_hidden(); ?>
                        <?php ContactForm::page_hidden(); ?>
                        <label><?php _e('To (seller)', 'modern'); ?>: <?php echo osc_item_contact_name();?></label><br />
                        <label><?php _e('Listing', 'modern'); ?>: <a href="<?php echo osc_item_url(); ?>"><?php echo osc_item_title(); ?></a></label><br />
                        <?php if(osc_is_web_user_logged_in()) { ?>
                            <input type="hidden" name="yourName" value="<?php echo osc_esc_html( osc_logged_user_name() ); ?>" />
                            <input type="hidden" name="yourEmail" value="<?php echo osc_logged_user_email();?>" />
                        <?php } else { ?>
                            <label for="yourName"><?php _e('Your name', 'modern'); ?></label> <?php ContactForm::your_name(); ?><br />
                            <label for="yourEmail"><?php _e('Your e-mail address', 'modern'); ?></label> <?php ContactForm::your_email(); ?><br />
                        <?php }; ?>
                        <label for="phoneNumber"><?php _e('Phone number', 'modern'); ?> (<?php _e('optional', 'modern'); ?>)</label> <?php ContactForm::your_phone_number(); ?><br />
                        <label for="message"><?php _e('Message', 'modern'); ?></label> <?php ContactForm::your_message(); ?><br />
                        <?php osc_show_recaptcha(); ?>
                        <button type="submit"><?php _e('Send message', 'modern'); ?></button>
                    </fieldset>
                </form>
            </div>
        </div>
        <?php osc_current_web_theme_path('footer.php'); ?>
    </body>
</html>

 

Regards,

Louis

Link to comment
Share on other sites

Wow, that is a mess of code. But, it doesn't look like that is the code that sends the email. That looks to be a form for someone to submit a new post.

 

You need to find the code that actually sends the emails. I guess you could modify the form to hard-code the administrator email to be saved as the 'yourEmail' value, which would result in those emails going to the administrator. But, then you would lose the submitter's email entirely. I doubt that would not be a good solution. So, you need to address in the code that sends the email.

Link to comment
Share on other sites

Thank you for the reply.

 

It seems like I have found the file/page that are used to "contact the publisher / seller" (please see below). 

 

Not sure whether it might link to another file that addresses the e-mail destination of the the submitted form though. Could you perhaps in any way advise? 

 

 

 

<div id="sidebar">
  <?php if( osc_get_preference('sidebar-300x250', 'osclasswizards_theme') != '') {?>
  <div class="ads_300"> <?php echo osc_get_preference('sidebar-300x250', 'osclasswizards_theme'); ?> </div>
  <?php } ?>
  <h1 class="title">
    <?php _e("Contact publisher", OSCLASSWIZARDS_THEME_FOLDER); ?>
  </h1>
  <div id="contact" class="widget-box form-container form-vertical block_list">
    <?php if( osc_item_is_expired () ) { ?>
    <p class="alert_user">
      <?php _e("The listing is expired. You can't contact the publisher.", OSCLASSWIZARDS_THEME_FOLDER); ?>
    </p>
    <?php } else if( ( osc_logged_user_id() == osc_item_user_id() ) && osc_logged_user_id() != 0 ) { ?>
    <p class="alert_user">
      <?php _e("It's your own listing, you can't contact the publisher.", OSCLASSWIZARDS_THEME_FOLDER); ?>
    </p>
    <?php } else if( osc_reg_user_can_contact() && !osc_is_web_user_logged_in() ) { ?>
    <p class="alert_user">
      <?php _e("You must log in or register a new account in order to contact the advertiser", OSCLASSWIZARDS_THEME_FOLDER); ?>
    </p>
    <p class="contact_button"> <strong><a href="<?php echo osc_user_login_url(); ?>">
      <?php _e('Login', OSCLASSWIZARDS_THEME_FOLDER); ?>
      </a></strong> <strong><a href="<?php echo osc_register_account_url(); ?>">
      <?php _e('Register for a free account', OSCLASSWIZARDS_THEME_FOLDER); ?>
      </a></strong> </p>
    <?php } else { ?>
    <?php if( osc_item_user_id() != null ) { ?>
    <div class="user-card">
      <figure><img class="img-responsive" src="http://www.gravatar.com/avatar/<?php echo md5( strtolower( trim( osc_user_email() ) ) ); ?>?s=400&d=<?php echo osc_current_web_theme_url('images/default.gif') ; ?>" /></figure>
    </div>
    <h3 class="name">
<i class="fa fa-user"></i><a href="<?php echo osc_user_public_profile_url( osc_item_user_id() ); ?>" ><?php echo osc_item_contact_name(); ?></a></h3>
    <?php } else { ?>
    <h3 class="name"><i class="fa fa-user"></i><?php printf(__('%s', OSCLASSWIZARDS_THEME_FOLDER), osc_item_contact_name()); ?></h3>
    <?php } ?>
    <?php if( osc_item_show_email() ) { ?>
    <p class="email"><?php printf(__('E-mail: %s', OSCLASSWIZARDS_THEME_FOLDER), osc_item_contact_email()); ?></p>
    <?php } ?>
    <?php if ( osc_user_phone() != '' ) { ?>
    <p class="phone"><i class="fa fa-phone"></i><?php printf(__("%s", OSCLASSWIZARDS_THEME_FOLDER), osc_user_phone()); ?></p>
    <?php } ?>
    <ul id="error_list">
    </ul>
    <form action="<?php echo osc_base_url(true); ?>" method="post" name="contact_form" id="contact_form" <?php if(osc_item_attachment()) { echo 'enctype="multipart/form-data"'; };?> >
      <?php osc_prepare_user_info(); ?>
      <input type="hidden" name="action" value="contact_post" />
      <input type="hidden" name="page" value="item" />
      <input type="hidden" name="id" value="<?php echo osc_item_id(); ?>" />
      <div class="form-group">
        <label class="control-label" for="yourName">
          <?php _e('Your name', OSCLASSWIZARDS_THEME_FOLDER); ?>
          :</label>
        <div class="controls">
          <?php ContactForm::your_name(); ?>
        </div>
      </div>
      <div class="form-group">
        <label class="control-label" for="yourEmail">
          <?php _e('Your e-mail address', OSCLASSWIZARDS_THEME_FOLDER); ?>
          :</label>
        <div class="controls">
          <?php ContactForm::your_email(); ?>
        </div>
      </div>
      <div class="form-group">
        <label class="control-label" for="phoneNumber">
          <?php _e('Phone number', OSCLASSWIZARDS_THEME_FOLDER); ?>
          (
          <?php _e('optional', OSCLASSWIZARDS_THEME_FOLDER); ?>
          ):</label>
        <div class="controls">
          <?php ContactForm::your_phone_number(); ?>
        </div>
      </div>
      <div class="form-group">
        <label class="control-label" for="message">
          <?php _e('Message', OSCLASSWIZARDS_THEME_FOLDER); ?>
          :</label>
        <div class="controls textarea">
          <?php ContactForm::your_message(); ?>
        </div>
      </div>
      <?php if(osc_item_attachment()) { ?>
      <div class="form-group">
        <label class="control-label" for="attachment">
          <?php _e('Attachment', OSCLASSWIZARDS_THEME_FOLDER); ?>
          :</label>
        <div class="controls">
          <?php ContactForm::your_attachment(); ?>
        </div>
      </div>
      <?php }; ?>
      <div class="form-group">
        <div class="controls">
          <?php osc_run_hook('item_contact_form', osc_item_id()); ?>
          <?php if( osc_recaptcha_public_key() ) { ?>
          <script type="text/javascript">
                            var RecaptchaOptions = {
                                theme : 'custom',
                                custom_theme_widget: 'recaptcha_widget'
                            };
                        </script>
          <style type="text/css"> 
div#recaptcha_widget, div#recaptcha_image > img { width:280px; } 
</style>
          <div id="recaptcha_widget">
            <div id="recaptcha_image"><img /></div>
            <span class="recaptcha_only_if_image">
            <?php _e('Enter the words above',OSCLASSWIZARDS_THEME_FOLDER); ?>
            :</span>
            <input type="text" id="recaptcha_response_field" name="recaptcha_response_field" />
            <div><a href="javascript:Recaptcha.showhelp()">
              <?php _e('Help', OSCLASSWIZARDS_THEME_FOLDER); ?>
              </a></div>
          </div>
          <?php } ?>
          <?php osc_show_recaptcha(); ?>
          <button type="submit" class="btn btn-success">
          <?php _e("Send", OSCLASSWIZARDS_THEME_FOLDER);?>
          </button>
        </div>
      </div>
    </form>
    <?php ContactForm::js_validation(); ?>
    <?php } ?>
  </div>
    <?php 
if( osc_get_preference('facebook-showitem', 'osclasswizards_theme') == "1"){
echo '<div class="block_list facebook">';
osclasswizards_facebook_like_box();
echo '</div>';
}
  ?>
  
</div>
Link to comment
Share on other sites

You need to stop bombarding us with unformatted, irrelevant code. Read the forum rules, especially the part about code tags.

 

Since you clearly have no idea how the application works, I strongly recommend against messing with it. This can end in a disaster. Even if you think it's just a small change, you may end up breaking other features like the update mechanism.

 

Who's maintaining the website? Ask them to do it. It's a small change for somebody who knows the software, it's irresponsible for everybody else.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.