Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Tip: Email Problem


Tecumseh

Recommended Posts

Hello All,

 

I finally figured out the reason my email was sending out to some addresses and not to others. ie: customer and not sales of my domain. After a frustrating day, I now have the imprint of my palm imbedded in my forehead and a store that'll now send out emails.

 

My solution was simple, after talking with ThomasR1, who was kind enought to talk to me on the phone, I realized the simple oversight that caused my problem.

 

It was the fact that I forgot to set my MX record to point to my mailserver.

 

What is the MX record? It's part of the DNS settings the MX record must point to your mail server. I.E. mail.yourdomain.com

 

If you omitted this like I did, simply contact your domain registar (the company you registered your domain name with) and have them set it. It'll take up to 48 hours for this to replicated (update) throughout the internet.

 

This will need to be done regardless if you are using Windows or Linux.

 

Hope this helps!

 

Dave

http://www.netfrog.ca

Make it your next Internet hop!

Link to comment
Share on other sites

  • 2 weeks later...

Ok, I see posts all the time about this problem - my email doesn't work from my windows server - and I see a few posts from people saying that they got it working, but very little information on what they did, if any.

 

So, since this caused me to bang my head repeatedly (some of those hurt too :wink: ) trying to figure it out, I finally did...

Here is what I came up with to fix the problem.

 

Skipping the obvious things, such as "white space", "smtp" setting with "CRLF", etc. here's the stuff that made me go bald! :shock:

 

First of all, make sure that your php.ini file is being correctly read. You can compare values by using the "Tools - Server Info" options in the admin panel.

There should be at least two settings that you should look very carefully at; the first one is smtp = and the second is sendmail_from.

My settings are shown here so you have a working example: (Please don't send email to my postmaster's address.)

[mail function]
; For Win32 only.

SMTP = mail2.megashare.net


; For Win32 only.

sendmail_from = [email protected]


; For Unix only.  You may supply arguments as well (default: 'sendmail -t -i').
;sendmail_path =

The SMTP setting MUST be a VALID FQDN of a mail server that will send email on your behalf.

The sendmail_from setting can be most anything, but make it something you don't mind others seeing as this address may be shown using certain features in osc. (Not sure if that's the way it's supposed to be, but that's what I get with "send-to-a-friend", etc.) You might want to follow the same address style I used above as some messaging software appears to use RFC requirements that will generate an error if you don't. (you may have to experiment with this to see what your capabilities are if you use something in a format other than that shown above.) The email routines within osC could probably use a bit more "error trapping" work done to them, but I'm not that good yet!

 

Next step is to MAKE SURE there is an MX record for the mail server in the domainspace where the server belongs and that it resolves correctly. (some ISP's can do some strange things here, some work and some don't.)

 

I am assuming that you are running Exchange Server or some other similar Mail System Software for the next part...

 

Make sure that you have a relay connection configured for the web server hosting your site on the mail server that will handle it's messages. You apparently aren't required to have MS SMTP Services running on the web server as I have mine turned off. (You might need a configured email client though.) That means that PHP is making the connection to the mail server and you MUST have the mail server configured to allow the web server to RELAY messages through it. This CAN be done without opening your mail server to the all too numerous UCE clubs on the Internet.

 

See Microsoft's Support Site at http://support.microsoft.com and search for KB Article number: Q193922.

You may also want to check out KB Article number: Q196626.

 

There are quite a number of articles relating to message relaying, restrictions, etc. so you might also want to do an Advanced Search on the Microsoft Support Site using Exchange Server in the product drop-down and the keyword relaying in the search-for field.

 

Once the RELAY is configured on the mail server and you have the php.ini file setup, the only thing left is to make sure you have valid email addresses in the store configuration and that you have send emails turned ON.

 

Oh, and don't turn buffering on in the php.ini file to get rid of the headers already sent message. The message is there because there is an error that needs to be fixed. You should be able to locate the error in the file described in the first line of the message. (usually not the line pointing to general.php)

 

If you still have problems, but the rest of the site seems to work fine, there is something missing or incorrect in one of the configuration pieces listed above. There is NOTHING else to configure on a windows host. (except the email server software :roll: )

 

 

I posted this here because Tecumseh's problem exhibited some of the same symptoms that I experienced when I started working on this issue. For some of the other pieces that I didn't cover here, but mentioned above, do a search in the forums using *windows email* or some variation within the asterick marks. Hope this fixes your communication troubles with osCommerce...

 

This really is the best FREE e-commerce package out there, so stick with it and Good Luck!! 8)

 

Obewanz

The GraphicZoo

check profile for web address

Link to comment
Share on other sites

Hello,

 

I am getting this error message only in portuguese version after the checkout process.

 

This is the complete error message:

 

 

Warning: Couldn't find constant CHARSET in /home/sites/www.linkwell.com.br/web/catalog/includes/classes/email.php on line 61

 

Warning: Couldn't find constant CHARSET in /home/sites/www.linkwell.com.br/web/catalog/includes/classes/email.php on line 62

 

Warning: Cannot add header information - headers already sent by (output started at /home/sites/www.linkwell.com.br/web/catalog/includes/classes/email.php:61) in /home/sites/www.linkwell.com.br/web/catalog/includes/functions/general.php on line 29

 

and the url is http://www.linkwell.com.br/catalog/checkou...out_process.php

 

If I change the language one step before the checkout process to english, all runs ok. If it is in portuguese, it gives this error.

 

I don't know where is the error.

 

Thanks

 

Sandro Herek

Link to comment
Share on other sites

  • 2 weeks later...

Sandro,

Try looking in your portuguese language files for "white space" before or after the php opening and closing tags (usually after the closing tag).

 

I'm pretty sure you'll find the problem there if it works in other languages.

 

Hope this helps!! :)

 

Regards,

Obewanz

The GraphicZoo

check profile for web address

Link to comment
Share on other sites

Hi Obewanz,

 

I did that, but there was none spaces. The problem was on the portuguese.php. I just overwirte it from english and worked great.

 

Thanks anyway.

 

Sandro

Link to comment
Share on other sites

ok i have a problem with sending mail to my customers.

when os commerce goes to wend mail to my customers i get a 550 error relay denied . so when i and add thisvariableto my relay tab to my mail server127.0.0.1 and thus creating a open relay i am able to send mail to my customers. is there a way to combatthis problem. i have readearlier post and havetried those methods and i still get the same results

 

any help would be really appreciates

Link to comment
Share on other sites

yes i checked there and about three other sites wqho check for open relay and i do get a open relay response. see my setup is a bit complicated i use something called ewall and it listens on port and my mail server listen on, the ewall forward the mail to the mail server, ewall is like a firewall for mail it has a virus filter in it and and it wil strip the virus from the email and send a report to the mailer who sent it and it will also make a log and a db of ip and domains that send virun and then at a preset time it send ip and domaind to a dnsblacklist file and then there blocked . but iui have truned this feature off and just had my normal straight forwar email server and i still get open relay response

Link to comment
Share on other sites

  • 2 months later...

Just another email problem:

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/virtual/site108/fst/var/www/html/catalog/includes/classes/email.php on line 71

 

Warning: Variable passed to each() is not an array or object in /home/virtual/site108/fst/var/www/html/catalog/includes/classes/email.php on line 72

 

Fatal error: Call to a member function on a non-object in /home/virtual/site108/fst/var/www/html/catalog/includes/functions/general.php on line 970

Is what my costumers get to see after creating a new account, most of the time ,but not allways

 

Paul

Link to comment
Share on other sites

Oops! Posted in the wrong forum!

 

To make this a tip after all, I post a solution to this problem also. Hopefully that compensates my error.

 

I read in the osC bug report section the following:

I upgraded PHP to 4.3.2 and this problem went away.

 

The argument to the email constructor is NULL inside the constructor. It remained NULL even after setting it to array(). The bug database for php.net was too slow to find a fixed bug between 4.3.1 and 4.3.2 that accounted for this behavior.

[email protected] @ 08/12/2003 03:03:23

Thanks for your help

 

(btw the problem occures with osC2.2 MS2)

 

original post was

Just another email problem:
Warning: reset() [function.reset]: Passed variable is not an array or object in /home/virtual/site108/fst/var/www/html/catalog/includes/classes/email.php on line 71

 

Warning: Variable passed to each() is not an array or object in /home/virtual/site108/fst/var/www/html/catalog/includes/classes/email.php on line 72

 

Fatal error: Call to a member function on a non-object in /home/virtual/site108/fst/var/www/html/catalog/includes/functions/general.php on line 970

Is what my costumers get to see after creating a new account, most of the time ,but not allways

 

Paul

Link to comment
Share on other sites

Any idea why I am getting this error?

A message that you sent could not be delivered to one or more of its

recipients. This is a permanent error. The following address(es) failed:

 

  [email protected]

    SMTP error from remote mailer after RCPT TO:<[email protected]>:

    host theoneyearproject.com [216.67.228.37]: 550-Verification failed for <[email protected]>

    550-unrouteable mail domain "beto.onestarrhosting.com"

    550 Sender verify failed

It sends to hotmail, yahoo and others, but won't send to email addresses on the same server as my shop.

 

~Priest~

Link to comment
Share on other sites

550-Verification failed for <[email protected]>

    550-unrouteable mail domain "beto.onestarrhosting.com"

The error is saying that you are missing an MX record (or possibly a PTR record or an A record) for beto.onestarhosting.com.

 

Not all sites check for this, so Yahoo, Hotmail, etc. may work even if things are misconfigured.

 

Hth,

Matt

Link to comment
Share on other sites

  • 4 months later...
Hello All,

 

I finally figured out the reason my email was sending out to some addresses and not to others. ie: customer and not sales of my domain. After a frustrating day, I now have the imprint of my palm imbedded in my forehead and a store that'll now send out emails.

 

My solution was simple, after talking with ThomasR1, who was kind enought to talk to me on the phone, I realized the simple oversight that caused my problem.

 

It was the fact that I forgot to set my MX record to point to my mailserver.

 

What is the MX record? It's part of the DNS settings the MX record must point to your mail server. I.E. mail.yourdomain.com

 

If you omitted this like I did, simply contact your domain registar (the company you registered your domain name with) and have them set it. It'll take up to 48 hours for this to replicated (update) throughout the internet.

 

This will need to be done regardless if you are using Windows or Linux.

 

Hope this helps!

 

Dave

Sorry, but

 

I have to contact the company I used to register my domain or the company I used to host my page?

 

My email server (I use this on outlook) is mail.jjardim.com. I have to use this server too?

 

 

Sorry for mistakes but I can't speak/write in english very well.

Link to comment
Share on other sites

I would think that your MX record should point to marco.serverbr2.com, as that is to what the PTR record for that IP points.

 

What problem are you seeing? I.e. what's not working? Emails to your address? To customer addresses? What? Can your host get you a copy of the error messages from the logs?

Always back up before making changes.

Link to comment
Share on other sites

I would think that your MX record should point to marco.serverbr2.com, as that is to what the PTR record for that IP points.

 

What problem are you seeing? I.e. what's not working? Emails to your address? To customer addresses? What? Can your host get you a copy of the error messages from the logs?

I did't receive email from oscommerce. For exemple: If I lost my password, if I create an account or any other option.

 

BUT

 

If I use 'send email to customers' option at Administration I receive e-mail. Only at this option.

 

What LOG I have to get with my host?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...