Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Contact us page - this has to be a simple fix


Shyne

Recommended Posts

Please keep things simple, i'm learning as I go here :rolleyes:

 

I have just set up www.monkeyshyne.co.uk and I test the contact us page and it does not send anything to my email address - I've searched the forum but can only find threads that relate to the email address not coming through, but I can't even get a message through to my address.

 

What am I doing wrong? it hasn't worked since day one and I really don't know what's going on with it.

 

Any help is greatly appreciated.

Link to comment
Share on other sites

Hi Mark

Do you have your email set in the admin?

Admin / configuration / mystore

 

what server are you hosted on?

 

Nic

 

 

Hi Nic,

 

Thanks for the swift response.

 

I have the following settings in config

 

Email options -

 

Title Value Action

E-Mail Transport Method sendmail

E-Mail Linefeeds LF

Use MIME HTML When Sending Emails false

Verify E-Mail Addresses Through DNS false

Send E-Mails true

E-Mail Linefeeds

 

 

My Store -

 

Title Value Action

Store Name Monkey Shyne Store

Store Owner [email protected]

E-Mail Address [email protected]

E-Mail From [email protected]

 

 

I'm hosted on Freehostia.com, I have setup an address ([email protected]) and can send mail to it and receive it, but when I fill in the "Contact Us" page nothing comes through.

 

Can you see an issue?

 

Thanks

Link to comment
Share on other sites

Hi Nic,

 

Thanks for the swift response.

 

I have the following settings in config

 

Email options -

 

Title Value Action

E-Mail Transport Method sendmail

E-Mail Linefeeds LF

Use MIME HTML When Sending Emails false

Verify E-Mail Addresses Through DNS false

Send E-Mails true

E-Mail Linefeeds

 

 

My Store -

 

Title Value Action

Store Name Monkey Shyne Store

Store Owner [email protected]

E-Mail Address [email protected]

E-Mail From [email protected]

 

 

I'm hosted on Freehostia.com, I have setup an address ([email protected]) and can send mail to it and receive it, but when I fill in the "Contact Us" page nothing comes through.

 

Can you see an issue?

 

Thanks

 

I have the same settings, and can not get me email to go through. I can send OUT email, but I'm not receiving the Contact Us messages. I just installed the Contact Us Super Enhancement, hoping that that would some how resolve the issue, but it has not. My hosting company is Best-Host.com, and they say they can't look at the script, but that all is in order on their end.

 

Also, I do not get a message saying that my message was sent. I just get redirected to my Shopping Cart. How do you get a message, or how do you change the redirect? Maybe that has something to do with the problem.

 

Diana

Diana

Link to comment
Share on other sites

I have the same settings, and can not get me email to go through. I can send OUT email, but I'm not receiving the Contact Us messages. I just installed the Contact Us Super Enhancement, hoping that that would some how resolve the issue, but it has not. My hosting company is Best-Host.com, and they say they can't look at the script, but that all is in order on their end.

 

Also, I do not get a message saying that my message was sent. I just get redirected to my Shopping Cart. How do you get a message, or how do you change the redirect? Maybe that has something to do with the problem.

 

Diana

 

I Have the same problem. I just instaled the oscommerce. I can send OUT email too, and I dont receive any one from Contact Us!!!

I have no idea what is hapening...

 

Please, if some one know what is going on...

 

Thanks

Fernando

Link to comment
Share on other sites

After weeks of "trying this", and "tweaking that", I learned from an online tutorial that a form (on my site) works when the php is on one page, and the actual form is on a different page. I was able to send myself a simple message that way. Now, I am just learning, so what I did is highly simple, and I'm sure that someone will be able to turn this into a wonderful new contribution. Here is what I did...

 

First, in the "includes/languages/english" folder, I copied the "contact_us.php" page, and renamed the copy "contact.php", then uploaded it.

 

Then, in the "includes/filenames.php" file, I added

define('FILENAME_CONTACT', 'contact.php');

right under the one for "CONTACT_US" and uploaded the saved file to my site.

 

I created a page that I named "contact.php" in the same folder as the "contact_us.php" is in. This is what my page looks like:

 

<?php
/*
 $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

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

?><!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->

<!-- added_form //-->		  
<?php 
$to = "[email protected]";
$subject = "Contact Us";
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$message = $_REQUEST['message'];
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers);
if($sent)
{print "Your mail was sent successfully";}
else
{print "We encountered an error sending your mail";}
?>
<!-- added_form_eof //-->	

<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

The final edit was to the actual "contact_us" page. This is what mine looks like (I have the Page Editor contribution, and I changed the picture file):

<?php
/*
 $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);
 // BOF edit pages 
$pages_name = "contact_us";
$page_query = tep_db_query("select pd.pages_title, pd.pages_body, p.pages_id, p.pages_name, p.pages_image, p.pages_status, p.sort_order from " . TABLE_PAGES . " p, " . TABLE_PAGES_DESCRIPTION . " pd where p.pages_name = '" . $pages_name . "' and p.pages_id = pd.pages_id and pd.language_id = '" . (int)$languages_id . "'");
$page = tep_db_fetch_array($page_query);
define('NAVBAR_TITLE', $page['pages_title']);
define('HEADING_TITLE', $page['pages_title']);
if($page['pages_status'])
define('TEXT_MAIN', nl2br($page['pages_body']));
else
define('TEXT_MAIN', '');
// EOF edit pages
 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><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"><?php echo tep_image(DIR_WS_IMAGES . 'contact.jpg', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
</table>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_MAIN; ?></td>
</tr>
<tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr> 

<!-- added_form //-->	  
<tr><td><p></p>
 <form name="contact" method="post" action="contact.php">
 <p><strong><font size="2" face="Verdana, Arial, sans-serif">Name:</font></strong> 
<input name="name" type="text">
 </p>
 <p><strong><font size="2" face="Verdana, Arial, sans-serif">Email Address:</font></strong> 
<input name="email" type="text">
 </p>
 <p><strong><font size="2" face="Verdana, Arial, sans-serif">Message: </font></strong></p>

<textarea name="message" cols="10" rows="10"></textarea>

 <p>
<input type="submit">
 </p>
</form>
</td></tr>
<!-- added_form_eof //-->		

	<tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr> 
 <!-- body_text_eof //-->

<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

I sure hope that someone will take this and improve on it! As you can see, I had to put my own email address in the contact.php page, as I could not figure out how to use STORE_OWNER_EMAIL_ADDRESS and make it actually work. I would very much like to create a more complicated form, such as my html subscriber form that I'm currently using (asks for address, city, state, zip, etc). Well, that's it... now on to some creating! :D

 

Diana

Diana

Link to comment
Share on other sites

I had similar issues when I set my emails up in the End I installed and used this http://addons.oscommerce.com/info/901

 

Works like a charm, just put the same info as you use for Outlook etc into it and it all works nicely!

 

Mat

 

My web server does not need authentication, so I didn't try that. Does yours?

 

Diana

Diana

Link to comment
Share on other sites

Just when I thought my woes were over... I realized that this email issue is much more in depth than just the Contact Us page. I did a whole new install (praise God for backups, so I didn't lose my product pages!) Now the email works. Period. I have discovered, though, that I have to clear the database and run the sql pages for all contributions if I install a new contribution, and then perform a database restore. Otherwise, the wishlist and other emailing pages get messed up. Slightly frustrating, but at least they work now! :D

Diana

Link to comment
Share on other sites

My web server does not need authentication, so I didn't try that. Does yours?

 

Diana

 

In theory it shouldn't, and oddly enough some of my mails were still going out. The worst ones were ones from the shop to the shop email address (IE at the same domain name).

 

My logic was if I used the SMTP Server then (A) All the emails would definitely go out, & (B) This may help with the messages not being classified as spam, as they've come from a "proper" email server.

 

Mat

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...