• Welcome to KonaKart Community Forum. Please login or sign up.
 

Configure SMTP server in konacart

Started by yooifeng, February 17, 2007, 11:33:00 am

Previous topic - Next topic

yooifeng

Hi,

I am getting below exception when i try to send email from konacart. Please advice where can I configure SMTP IP host.

Details:
The details of the malfunction are :

Exception Name = com.konakart.app.KKException
Exception Message = An email cannot be sent because the SMTP_SERVER configuration has not been set to a valid SMTP server
Exception Stack Trace =
at com.konakart.bl.EmailMgr.getProperties(EmailMgr.java:125)
at com.konakart.bl.EmailMgr.(EmailMgr.java:105)
at com.konakart.app.KKEng.sendOrderConfirmationEmail(KKEng.java:1423)
...

Thanks in advance.

john

Hi,

These are set in the database in the configuration table.

There's an sql script that you'll find under the database directory in the kit that shows you all the inserts.   You will have to set the values that work for you of course!

Here's an extract of the email-related configuration values:


INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES                ('SMTP Server',          'SMTP_SERVER',        'ENTER_YOUR_SMTP_SERVER_HERE', 'The SMTP server',                                         '21', '1', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, set_function) VALUES  ('SMTP Secure',          'SMTP_SECURE',        'false',                       'Whether or no the SMTP server needs user authentication', '21', '2', now(), 'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES                ('SMTP User',            'SMTP_USER',          'user@yourdomain.com',         'The SMTP user',                                           '21', '2', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES                ('SMTP Password',        'SMTP_PASSWORD',       '',                           'The SMTP password',                                       '21', '4', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES                ('Email Reply To',       'EMAIL_REPLY_TO',      'user@yourdomain.com',        'The Reply To Address',                                    '21', '5', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, set_function) VALUES  ('Debug Email Sessions', 'DEBUG_EMAIL_SESSIONS','true',                       'Debug email sessions',                                    '21', '6', now(), 'tep_cfg_select_option(array(\'true\', \'false\'), ');

Good luck,
john

yooifeng

Hi,

Thanks for your help, email function for konakart is now working.

  :D

msa


msa

Hi,

I have osCommerce Installed for back end admin purposes. For some reason im not able to send emails from the osCommerce Admin app. The settings provided by john in the previous posts works great with the konakart side.

I was wondering if anyone using osCommerce Admin are having this problem and have a solution..wud be great while we wait for the konakart admin app.

Shaheem.






john

Hi Shaheem,

It sounds like you are well on your way!

I'm no expert on osCommerce email setup but here are some things to check:

php.ini  - check that this is configured as you require, look under [email function]:

[mail function]
SMTP = yourSMTPserver
smtp_port = 25

Check the email configuration parameters in the Admin App itself.
- Check Configuration Options/Email Options
- Check Configuration Options/My Store

If you can't get it to work after verifying these there are probably many other people who have had the same problems as you... so I suggest that you check the osCommerce forum at http://forums.oscommerce.com/index.php?showforum=1

Good luck,
John


msa

Hey john,

Yeah im full on testing all feature and have already started creating my online store. This email thing has me banging my head for the past few days.

I have already tried the php.ini settings thats u suggested without success. This is the message that i get:


QuoteWarning: mail() [function.mail]: Mailserver rejected our "sendmail_from" setting in C:\webs\test\catalog\admin\includes\classes\email.php on line 520

Warning: Cannot modify header information - headers already sent by (output started at C:\webs\test\catalog\admin\includes\classes\email.php:520) in C:\webs\test\catalog\admin\includes\functions\general.php on line 22


..but this message is current, after i tried a few suggestions on the osCommerce support forum. I used to get another message that said i needed authentication to send emails. I assume this was because osCommerce maybe tries sending emails through smpt without a username and password or maybe its because im using localhost for testing.

Nways is there any other admin appz that u might suggest i could try out for comparasion purposes.

Thankx
Shaheem




paolo

Hey Shaheem,

Please let us know when your shop is online. We'd be really interested in seeing it.

Thx,

Paolo

john

Hi Shaheem,

Here's one, but I've never used it http://oscommerce-manager.magneticone.qarchive.org/ so I can't say whether it's good or bad.

It's a shame you can't solve the email problem.  You could always try using a local smtp server - that doesn't require authentication.

The sendmail_from rejection could be due to that SMTP server guarding against spammers.  Can you try setting that to something else that it will accept (eg. the sent-from email address you would usually use when sending through that SMTP server).

You won't have to wait too much longer for the KonaKart Admin App which is only a few weeks away.
John

msa

March 02, 2007, 01:35:50 pm #9 Last Edit: March 02, 2007, 08:57:32 pm by msa
Hey thats great...a few weeks ....cnt wait to test it out  8)

I will try to install the osCommerce Manager u posted..thankx.

hmmm..yeah i think a local smtp server would actually solve the problem.. I was trying to use google's gmail and a local ISP account..

Nways here's a small peek of my site  :)



msa

hmm...dnt worry abt the company name coz they dnt match  :-\ ...its just a fictitious name im using to test.

john

Your site is coming along nicely - good luck with it!
John

msa

Thankx  :) konakart has saved me a lot of time..and i dnt like php that much...so yeah its great.

Shaheem.