Forums / Templates, Stylesheets, Page Layout / not sure about how to set up email

not sure about how to set up email

Locked

Started by adam65 on 31 Jul 2009, 3:34 AM · Views: 1,532

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
31 Jul 2009, 3:34 AM
#1
adam65 avatar

adam65

New Zenner

Join Date:
Jul 2009
Posts:
89
Plugin Contributions:
0

not sure about how to set up email

HI I have set up my zcart (1.3.8a)

But I can't get the email function to work.

I have windowsxp, apache, php, mysql installed... so I running my own server.

I have 1 client with his zencart attached to https://www.attackinfo.com.au

The problem is that when a customer fills in the log in form and enters in his email address and submits the form he gets a message: Email Error: SMTP Error: Could not connect to SMTP host.

Can someone help me set this up so it can connect.

Thankyou

31 Jul 2009, 4:17 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: not sure about how to set up email

Um ... please don't take this the wrong way ...

But ...

A PC running Windows XP has no business running a live website. And, since Windows doesn't have any built-in support for sending email for websites, it can't do it unless you either install a mailserver application to do that and learn how to configure and run it, or tell your web apps to send email through some external server.

You are BETTER advised to put the site on a real live webserver and test your emails from there, since that's where you'll need to make them work anyway.
And, to stop the SMTP Error messages when running it from your PC, set the "Send Emails" option to "false" so that it completely skips all email functionality, so you can play with the rest of the functionality in the meantime.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Jul 2009, 4:22 AM
#3
adam65 avatar

adam65

New Zenner

Join Date:
Jul 2009
Posts:
89
Plugin Contributions:
0

Re: not sure about how to set up email

thanks for the reply.

Why can't I run a live website off the server I have set up?

What sould I be running as an operating system to host live sites?

have you visited the url?

31 Jul 2009, 4:35 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: not sure about how to set up email

Unless you have extensive experience with properly securing the webserver against all manner of attacks, then I can almost guarantee that your webserver will be wide open to attacks. And, if you're asking about how to get the webserver to handle email, I'm certain you've not enough experience to properly secure the server. No offence intended in that statement or my posts. Just an observation.

Also, a self-operated PC is seldom tuned well to run a webserver with adequate performance, both at the database level and the webservice level. Plus, if it is on a computer that's shared as a user PC with just having the web services in the background, one or the other is most certainly going to affect the other, making your customers' shopping experience less than optimal.

In addition, a home-based PC is typically connected behind a slow-speed ISP connection, which introduces a few potential problems: Most ISPs don't offer adequate speed for a busy website. Most ISPs frown upon commercial use of their services, so you might be in violation of your contract with them. Most ISPs block certain ports that are typically vulnerable to spam, but which are usually required by live webservers for normal use ... including port 25 which is used for outgoing email.

It's not so much the operating system, although that's a part of it.

Naturally, you can do what you like. Just be advised that the storeowner and their customers will likely end up frustrated and may not even know that it's the so-called server and its location that's the problem.

Again, no offense intended. Just trying to help paint the bigger picture.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Jul 2009, 6:03 AM
#5
adam65 avatar

adam65

New Zenner

Join Date:
Jul 2009
Posts:
89
Plugin Contributions:
0

Re: not sure about how to set up email

Thanks again for replying.

What do you think is causing the error message:
Email Error: SMTP Error: Could not connect to SMTP host.?

I will gladly set up a dedicated mail server (but try a virtual one first) if that is what I have to do.

I admit I am not very experienced at running a webserver but I am trying to get the experience by setting one up.

Also the website I am currently hosting is a wholesale outlet for a retail aquarium in our local area. The owner has about 10 wholesale customers that he sells his fish to and previously just faxed out a list to them every week. Now they can go to the website and actually see what they are buying and (hopefully if I can get the mail working) place orders online.

There won't be more than 10 people on at a time and if his wholesale customerbase grows we will move the site to a paid-for host.

The advice I glean from your post is:

  1. learn how to secure my webserver from attacks and in doing this I will learn what I need to know about setting up the mail handling function of the webserver.

  2. dedicate a pc for the server, properly tune it to adequately run database and webservice functions... don't run the webservices in the background.

  3. check with my ISP what ports may be blocked and if I can host a commercial website.

I can learn all of these things and I figure now that my problem lies more with the webserver than zencart.

I take no offense but was looking for some support in my endeavour instead of someone totally shooting holes in it.
I am appreciative that you took the time to reply though.

Thank you.

31 Jul 2009, 6:22 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: not sure about how to set up email

I didn't mean to deflate your enthusiasm for learning. Just drawing very important attention to the matter so that you walk forward with eyes wide open.
As for learning more about running a webserver, I might suggest poking around someplace like the forums at webhostingtalk.com and various websites dedicated to that topic.

In terms of getting email to work from a server behind an ISP firewall, you have a few issues to consider:

  • port 25 is likely blocked by the ISP firewall, so you'll likely need to use port 26 (if your SMTP server is listening on that port) or 465 or 587
  • since you're needing to have the other server do all your emailing, you'll need to set email transport to SMTPAUTH, and provide server/user/pwd/port details

You may find some help in the many email troubleshooting tips here: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Email_Problems

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Jul 2009, 6:30 AM
#7
adam65 avatar

adam65

New Zenner

Join Date:
Jul 2009
Posts:
89
Plugin Contributions:
0

Re: not sure about how to set up email

Thanks again Iwill try smptauth.

I will let you know how I go.

3 Aug 2009, 1:45 PM
#8
adam65 avatar

adam65

New Zenner

Join Date:
Jul 2009
Posts:
89
Plugin Contributions:
0

Re: not sure about how to set up email

Email Error: SMTP Error: Could not connect to SMTP host.

Hi again,

I have tried smtpauth, smpt, and php as email transport methods.

I have installed Mercury mailserver and configured it to the point that I can send to and receive ok to my isp email address using outlook to collect the mail (sending directly from mercury).

I am stumped as to why I keep getting this message whether I send email from the zencart admin or try and log in a dummy customers info (with an active external email address).

I have a feeling I am just not getting the email options in configuration/email options (zen admin) right... or I have missed some basic addition to a config file somewhere.

I have read every post regarding mercury but I'm still getting the above error message.

Can anyone suggest a possible fix? If someone could explain what factors would possily cause this error message to display that would be a good start. (obviously Zen Cart is not finding the SMTP Host... but how can I direct it to FIND the host I have successfully set up on my system?)

I might add that after days trying to solve this I already feel very frustrated and very stupid (and as you read this you probably would agree with the latter) but if anyone decides to try to help I would be eternally grateful.

I have successsfully used telnet to connect directly to my isp's mail server so I figure port 25 is not blocked.

I should add that I have set up a gmail account for testing, I have an ISP email account, then in mercury I have adam@localhost, postmaster@localhost, admin@localhost and tester@localhost.

Knowing that, is it possible someone might be able to tell me what I need to enter into configuration-emailoptions-Email Address (Displayed to Contact you) and Email Address (sent FROM) and SMTP Email Account Mailbox and SMTP Email Mail Host? ( i mean i think i have tried every possible combination but please please go ahead and tell me what you think they should be if possible.)

And then ... there's the PHP.ini file here;s what's in there now:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = 121.223.214.219
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = admin@localhost

Can you see something i've done wrong here?

Someone must have been able to set it up with the following like me: windowsxp, xampp, apache, php, mysql. I hope someone sympathetic to that setup might answer.

Thankyou

3 Aug 2009, 3:28 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: not sure about how to set up email

Adam65:

Someone must have been able to set it up with the following like me: windowsxp, xampp, apache, php, mysql.
What I do when I'm using a windoze PC as a test server for development or testing a new site or whatever, is this:

a) Install xampp (on XP SP2) (AGAIN: XAMPP is ONLY suitable for temporary testing/staging, and NOT for a live website ... it's simply not secure enough for a live site)

b) Install Zen Cart v1.3.8a normally, using all defaults other than giving the database name/user/pwd details.

c) Go into Admin->Configuration->Email Options, set the following:

  • email transport = smtpauth
  • fill in all the SMTP fields with the account name, password, server, port ... all from known working settings used in outlook or any other email program that is successfully using the same smtp account to send emails ... note: outlook is set with the "require authentication" box on the SMTP outbound user account settings ... basically this is the same as "smtpauth" in ZC.
    In my case port 25 is blocked unless I'm sending email through my ISP's mailserver, which I'm not, so I use port 26 which I know is open on my hosting company's mailserver where the smtp account exists.

d) Use zen cart normally. Emails are sent directly through the smtp server specified in the email options settings.
Doesn't use mercury ... no need to. Don't even have mercury installed.
Nothing special changed in php.ini other than whatever xampp already does.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Aug 2009, 1:29 AM
#10
adam65 avatar

adam65

New Zenner

Join Date:
Jul 2009
Posts:
89
Plugin Contributions:
0

Re: not sure about how to set up email

Hi DrByte,

I very much appreciate your reply.
Thanks for persevering with me.

I will attempt to follow your advice accurately.

I am at the stage now where, just to see it working, I am looking around for a proper host, although at this stage just for testing.

Thanks again. I will post my results later today.

Regards,
Adam

4 Aug 2009, 2:22 AM
#11
adam65 avatar

adam65

New Zenner

Join Date:
Jul 2009
Posts:
89
Plugin Contributions:
0

Re: not sure about how to set up email

Thankyou very much.
The suggested configuration works!
I am greatly relieved !!!

I abandoned mercury and then I think it was this line in your advice that did it for me:

fill in all the SMTP fields with the account name, password, server, port ... all from known working settings used in outlook or any other email program that is successfully using the same smtp account to send emails ... note: outlook is set with the "require authentication" box on the SMTP outbound user account settings ... basically this is the same as "smtpauth" in ZC.

thankyou thankyou thankyou... a thousand thankyou's.

Just as a matter of interest if you were to host your own website, instead of Xampp, winxp, etc.. what would you use?

(I very much value your advice)

regards

Adam

4 Aug 2009, 2:40 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: not sure about how to set up email

Adam65:

thankyou thankyou thankyou... a thousand thankyou's.You're welcome. Glad you got it sorted out.
Adam65:

Just as a matter of interest if you were to host your own website, instead of Xampp, winxp, etc.. what would you use?The short answer is: I wouldn't host it myself. I'd leave it to someone who does that by profession and knows all the nuances of it inside and out.
My own professional knowledge and years of experience with servers affords me the luxury of understanding a significant amount of the complexities involved in running, supporting, troubleshooting (and kicking, on occasion) servers in high-pressure commercial environments. And, even with all that, I'd rather leave the job to someone else.
But, if I were to do it myself, I'd use one of the many Linux flavors, along with the usual Apache, MySQL , PHP collection. I'd never do it on a windoze box. Period.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Aug 2009, 2:49 AM
#13
adam65 avatar

adam65

New Zenner

Join Date:
Jul 2009
Posts:
89
Plugin Contributions:
0

Re: not sure about how to set up email

Thanks alot. I have a red hat box with apache, php and mysql on it. I have been using my windows box because it has a UPS and I built it with the top of the line m/board, quad core cpu's, ddr3ram etc... and It's my development machine. (not that I'm any great developer... just starting out).

Just been testing the email and I can send from "send email" in tools... no probs (sends from admin@localhost)

I can log a dummy customer and ZC sends a confirmation email to the customers address... no probs

BUT when (as the customer) I try to send back to admin I get the message: Email Error: SMTP Error: The following recipients failed: admin@localhost

Any suggestions?

I have a simple question also which I was just about to post in the first customisation issues forum ...
I can't see any Contact Us link on the zencart I have setup... have I switched it off somewhere in the admin? Can't see where.. any suggestions?

Thanks for your time... I don't mind if you redirect me on this one. ( i realise it's getting late in Canada)

4 Aug 2009, 2:55 AM
#14
adam65 avatar

adam65

New Zenner

Join Date:
Jul 2009
Posts:
89
Plugin Contributions:
0

Re: not sure about how to set up email

just a note: when someone helps me out i always visit the link to their own ZC to check it out and see if it's something I need and can repay their kindness by ordering. However, you don't have any links attached to your signature.

Do you have a site or two (or fifty) I can view?

4 Aug 2009, 2:59 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: not sure about how to set up email

The best way you can support the Zen Cart project is to sign up with one of our Recommended Services partners, especially one of the credit card processing partners. Or you can make donations to the project: http://www.zen-cart.com/index.php?main_page=infopages&pages_id=14

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Aug 2009, 3:01 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: not sure about how to set up email

Adam65:

BUT when (as the customer) I try to send back to admin I get the message: Email Error: SMTP Error: The following recipients failed: admin@localhost

Any suggestions?Well, 2 thoughts:
a) I'm not surprised that you'll have problems with a @localhost address
b) "How" are you "trying to send back to admin"?

Adam65:

I can't see any Contact Us link on the zencart I have setup... have I switched it off somewhere in the admin? Can't see where.. any suggestions?
The Contact Us link is in the "information.php" sidebox. Do you have that turned off?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Aug 2009, 3:10 AM
#17
adam65 avatar

adam65

New Zenner

Join Date:
Jul 2009
Posts:
89
Plugin Contributions:
0

Re: not sure about how to set up email

Well when you first fill in the form as a new customr and it comes back with you have been successful there is a small contact us link. i clicked that and tried to send a message back but got that error message.

the information.php in Layout box controller is on and left and on now and I can see contact us... Thankyou.

4 Aug 2009, 3:24 AM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: not sure about how to set up email

I would expect that it would send emails fine if real email addresses were used, instead of "admin@localhost"

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Aug 2009, 3:33 AM
#19
adam65 avatar

adam65

New Zenner

Join Date:
Jul 2009
Posts:
89
Plugin Contributions:
0

Re: not sure about how to set up email

yep. sorry (again: for the dumb q). that worked