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

Mail Sending problem

Started by Ketan B, July 04, 2012, 01:58:27 pm

Previous topic - Next topic

Ketan B

Hello All,

         I  am trying to send Welcome mail, Forgot password mails. I have followed Email Configuration described in User guide.
   I have also followed http://www.konakart.com/forum/index.php/topic,484.msg2144.html#msg2144 and copied *.vm files under the classes folderbut still I'm not able to send and receive mail.

I simply want to send mail using gmail account.

I'm getting following exception

04-Jul 12:38:21 ERROR (?:handleException:?) A customer has received the following exception message: : Exception Name = com.konakart.app.KKException : Exception Message = Email address =  cannot be used because of the following reason : Illegal address<br>The full exception is:
com.konakart.app.KKException: Email address =  cannot be used because of the following reason : Illegal address
   at com.konakart.bl.Emailer.getMailAddressFromString(Unknown Source)
   at com.konakart.bl.Emailer.refreshConfigs(Unknown Source)
   at com.konakart.bl.Emailer.<init>(Unknown Source)
   at com.konakart.bl.EmailMgr.getEmailer(Unknown Source)
   at com.konakart.bl.EmailMgr.sendHTML(Unknown Source)
   at com.konakart.bl.EmailMgr.sendNewPasswordEmail1(Unknown Source)
   at com.konakart.bl.SecurityMgr.sendNewPassword1(Unknown Source)
   at com.konakart.app.KKEng.sendNewPassword1(Unknown Source)
   at com.konakart.al.CustomerMgr.sendNewPassword(Unknown Source)
   at com.konakart.actions.ForgotPasswordSubmitAction.execute(Unknown Source)
   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
   at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)

Please help me out.

Ketan B


Ketan B

Please help me. I'm still unable to send mail.

ming

There's a clue in the exception message:

Email address =  cannot be used because of the following reason : Illegal address

Could it be that you have a blank address somewhere that needs to be specified?

Have you tried enabling debugging on email sessions? (there's a configuration parameter to set for this on the Email Options configurations panel in the Admin App called "Debug Email Sessions")...    This can often provide useful information.

Ketan B

Thank You very much for reply. I have enabled debug session already.

While solving problem I come across
http://www.konakart.com/forum/index.php?topic=791.0
I have changes EMAIL_FROM from configuration table to correct value.
After that I was getting starttls javamail error but i
continue to try diffrent setting and now I'm getting same exception


The details of the malfunction are :

Exception Name = com.konakart.app.KKException
Exception Message = Email address = cannot be used because of the following reason : Illegal address


My Email option in Admin App are

Send E-Mails  : true
SMTP Server   : smtp.gmail.com
SMTP Secure   : false
SMTP User     : myuser@gmail.com
SMTP Password : password
E-Mail From   : myuser@gmail.com
Debug Email Sessions : true
KonaKart mail properties filename : /usr/local/konakart/conf/konakart_mail.properties
Number of email sender threads : 6
Email Integration Class : com.konakart.bl.EmailIntegrationMgr


My Mail properties file
#--------------------------------------------------------------------------------------------
# KonaKart Mail Properties
#--------------------------------------------------------------------------------------------

#--------------------------------------------------------------------------------------------
# These properties are applied first are overriden by any matching properties set
# in the KonaKart Admin App
#--------------------------------------------------------------------------------------------

#--------------------------------------------------------------------------------------------
# These properties are set based on values defined in the KonaKart Admin App
# (So don't set these in this file!)

#mail.smtp.user              Default user name for SMTP.
#mail.smtp.host              The SMTP server to connect to.
#mail.debug                  To enable protocol-level debugging
#mail.smtp.auth              If true, attempt to authenticate the user using the AUTH command. Defaults to false.
#mail.smtp.from              Email address to use for SMTP MAIL command. This sets the envelope return address. Defaults to msg.getFrom() or InternetAddress.getLocalAddress(). NOTE: mail.smtp.user was previously used for this. 

#--------------------------------------------------------------------------------------------
# Examples of other mail properties:

#mail.smtp.port              The SMTP server port to connect to, if the connect() method
#                            doesn't explicitly specify one. Defaults to 25.
#mail.smtp.connectiontimeout Socket connection timeout value in milliseconds. Default is
#                            infinite timeout.
#mail.smtp.timeout           Socket I/O timeout value in milliseconds. Default is infinite
#                            timeout.
#mail.smtp.localhost         Local host name used in the SMTP HELO or EHLO command. Defaults
#                            to InetAddress.getLocalHost().getHostName(). Should not normally
#                            need to be set if your JDK and your name service are configured
#                            properly. 
#mail.smtp.localaddress      Local address (host name) to bind to when creating the SMTP
#                            socket. Defaults to the address picked by the Socket class.
#                            Should not normally need to be set, but useful with multi-homed
#                            hosts where it's important to pick a particular local address to
#                            bind to. 
#mail.smtp.localport         Local port number to bind to when creating the SMTP socket.
#                            Defaults to the port number picked by the Socket class. 
#mail.smtp.ehlo              If false, do not attempt to sign on with the EHLO command.
#                            Defaults to true. Normally failure of the EHLO command will
#                            fallback to the HELO command; this property exists only for
#                            servers that don't fail EHLO properly or don't implement EHLO
#                            properly. 
#mail.smtp.starttls.enable   If true, enables the use of the STARTTLS command (if supported
#                            by the server) to switch the connection to a TLS-protected
#                            connection before issuing any login commands. Note that an
#                            appropriate trust store must configured so that the client
#                            will trust the server's certificate. Defaults to false. 

#--------------------------------------------------------------------------------------------
# Typical GoogleMail Set-up:  (set up the email parameters in the Admin App as well as these)

#mail.transport.protocol   = smtp
#mail.smtps.port           = 465
#mail.smtps.host           = smtp.gmail.com
#mail.smtps.auth           = true
#mail.smtp.user            = myuser@gmail.com
#mail.smtp.password        =
#mail.smtp.starttls.enable = false

I'm still not able to receive mail. Please help me

Ketan B

Hello All,

I know i'm must be doing some silly mistake but please point me to correct direction.

Hopeful
Ketan

ming

If you're trying to send your email through gmail are you sure you want to comment out the gmail settings?   Look under "Typical GoogleMail Set-up:"