Jump to content



Photo
- - - - -

e-mail from Contact Us form not working.


This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1   flexiverse

flexiverse
  • Members
  • 21 posts

Posted 29 May 2008 - 10:37

hi,

When I complete the "contact us" form the e-mail is not arrived to my account.

How can I test the oscommerce config?

- the e-mail entered in osc admin does work, I can e-mail it directly from another account.


help!

#2   flexiverse

flexiverse
  • Members
  • 21 posts

Posted 29 May 2008 - 10:51

hi,

When I complete the "contact us" form the e-mail is not arrived to my account.

How can I test the oscommerce config?

- the e-mail entered in osc admin does work, I can e-mail it directly from another account.


help!



#3   pubdomains.com

pubdomains.com
  • Members
  • 790 posts

Posted 29 May 2008 - 11:49

1. Is OSC sending any email (create account / reset password/ order) or NO emails?
2. Login to Admin -> Configuration -> Email Options -> Send Email -> Is it set to TRUE or FALSE?
3. What are the settings for sending emails? E-Mail Transport Method SMTP or sendmail ?
Best Regards,
Gaurav India
Status: Not Online | Enjoy Weekend Fellows!!!

#4   flexiverse

flexiverse
  • Members
  • 21 posts

Posted 29 May 2008 - 12:58

1. Is OSC sending any email (create account / reset password/ order) or NO emails?
2. Login to Admin -> Configuration -> Email Options -> Send Email -> Is it set to TRUE or FALSE?
3. What are the settings for sending emails? E-Mail Transport Method SMTP or sendmail ?


1. Is OSC sending any email (create account / reset password/ order) or NO emails?

YES for create account, reset password...

2. Login to Admin -> Configuration -> Email Options -> Send Email -> Is it set to TRUE or FALSE?

Send Email is set to TRUE

3. What are the settings for sending emails? E-Mail Transport Method SMTP or sendmail ?

sendmail (as it's a linux server)

---
It's highly confusing, I'm looking at the code and they all use the same e-mail function.

in general.php the first two lines are:

function tep_mail( blah blah)

if (SEND_EMAILS! ='true') return false


in contact_us.php

if I put

$checkmail = tep_mail(blah)

if ($checkmail) echo 'true' else echo 'false'


it outputs FALSE when I send a mail !!!

what the heck!!!

in other words it thinks Send Email is set to FALSE at that point, when it can't be!!!

Jesus man what the hell is going on!

help!!

#5   pubdomains.com

pubdomains.com
  • Members
  • 790 posts

Posted 29 May 2008 - 14:06

tep_mail(blah) is failing -- most likely due to text in $enquiry field ..
Check if you are using ' while you are typing the message.
Test with just one word in enquiry field, and view output of each variable that is being passed to tep_mail method (function)
Comment tep_mail function and replace it with hard coded tep_mail("My Name","My Address","SUBJECT","ENQUIRY","UR NAME","UR Address"); and run the test to see if you get it, if you do, most likely it is the text that is causing issue --

HTH,
Best Regards,
Gaurav India
Status: Not Online | Enjoy Weekend Fellows!!!

#6   XtremeRovers

XtremeRovers
  • Members
  • 25 posts

Posted 29 May 2008 - 18:39

All,

I am having the same kind of problems,
When I use the contact form, I do not get emails.
When I use admin to send emails to customers, they do not get the email.

I checked what was recommended above and see that every thing looks correct.

When I created my own contact us .php form, I used the following code and was able to send emails,

ini_set('sendmail_from', 'user@domain.com);
mail("user@domain.com", $subject, $message, $from);


But I can not find the code that actually send email using the osCommerce "contact us Form"

Any ideas?
Live life authentically.

#7   bpopelar

bpopelar
  • Members
  • 324 posts

Posted 29 May 2008 - 19:47

An email is sent by email.php class located in the includes/classes or admin/includes/classes directory (yes, there are two copies of the same file). Near the end of the send() function you will find the call to mail() and you can add your ini_set function there or pass a 5th parameter to the mail function and pass in the string "-f user@domain.com".

Ben

#8   XtremeRovers

XtremeRovers
  • Members
  • 25 posts

Posted 29 May 2008 - 19:53

An email is sent by email.php class located in the includes/classes or admin/includes/classes directory (yes, there are two copies of the same file). Near the end of the send() function you will find the call to mail() and you can add your ini_set function there or pass a 5th parameter to the mail function and pass in the string "-f user@domain.com".

Ben


Hey thanks Ben,
I will give that a try.
Live life authentically.

#9   XtremeRovers

XtremeRovers
  • Members
  • 25 posts

Posted 30 May 2008 - 16:37

Hey thanks Ben,
I will give that a try.


Ok, now the contact form works, but when you send an email from the admin page to all customers. It say email was sent, but no one is receiving the emails

Any other ideas?
Live life authentically.

#10   bpopelar

bpopelar
  • Members
  • 324 posts

Posted 02 June 2008 - 19:07

Ok, now the contact form works, but when you send an email from the admin page to all customers. It say email was sent, but no one is receiving the emails

Any other ideas?

Do you have the admin -> configuration -> my store -> email from parameter defined?

This is the parameter that defines the source email address of newsletters and email sent by the admin side of the website. Since you are now receiving emails generated by the front side of the web site, your email is basically working. This is the only parameter I can think of that could cause the admin / back side emails to not work.


Ben

#11   digibiz08

digibiz08
  • Members
  • 11 posts

Posted 16 July 2008 - 16:48

Hi joker,
I had the same problem. I can send mail from admin but I cannot receive mails from contact us page.
I tried using the mod you provide, but i got blank page when sending mail from contact us page.
Do you know how to fix this?