How to configure the server email ?.

427 views
Skip to first unread message

pve...@gmail.com

unread,
Jul 3, 2012, 11:42:11 PM7/3/12
to wisemappi...@googlegroups.com
Hi,

How can we configure the server e-mail ?

Regards,
Paulo

alane...@gmail.com

unread,
Jul 26, 2012, 1:02:16 PM7/26/12
to wisemappi...@googlegroups.com, pve...@gmail.com

Have a look at
wisemapping-v3.0.beta3/webapps/wisemapping/WEB-INF/app.properties


##################################################################################
# Mail configuration. Must be configured to enable user registration confirmation.
##################################################################################

#------------------------
# Plain SMTP Server Configuration
#------------------------
mail.smtp.port=25
mail.smtp.host=localhost
mail.username=root
mail.password=
mail.smtp.auth=false
mail.smtp.starttls.enable=false
mail.smtp.quitwait=false

#------------------------
# SSL SMTP Server Configuration
#------------------------

#------------------------
# GMAIL SMTP Configuration
#------------------------
#mail.smtp.port=587
#mail.smtp.host=smtp.gmail.com
#mail.username=<gmail-user-account>
#mail.password=<gmail-password>
#mail.smtp.auth=true
#mail.smtp.starttls.enable=true
#mail.smtp.quitwait=false

#------------------------
# Emails configuration
#------------------------

# Required: "from" email account that will appear in the emails sent from the sender.
mail.serverSendEmail=root@localhost

# Optional: Support account that the users could use to contact you. This address will appear in emails and in some places in the site.
mail.supportEmail=root@localhost

# Optional: Unexpected errors will be reported to this address.
mail.errorReporterEmail=


Onkoi Studios

unread,
Nov 1, 2012, 12:11:24 AM11/1/12
to wisemappi...@googlegroups.com, pve...@gmail.com, alane...@gmail.com
I've played around a bit with these configuration settings, and two things I've run into:
First, I'm unable to get email sending to work, at all. I'm not sure if this is because my email host is on a different box, or if there are some sort of restrictions put in place by my host...one way or another, the mail isn't getting delivered. Is there any sort of SMTP log generated by WiseMind that I could look through for more information?

Secondly, if I disable email confirmation via the config file, registrations don't work. When someone tries to register, the registration page just sits there, waiting. It doesn't even get to the validation checks, because when I put in the CAPTCHA wrong, it still just sits there, with my browser telling me the page is loading.

~Kevin

Onkoi Studios

unread,
Nov 1, 2012, 12:15:20 AM11/1/12
to wisemappi...@googlegroups.com, pve...@gmail.com, alane...@gmail.com
I'd been running the WiseMap server inside a screen, and when I pulled it back up, I had this error sitting in the console. Note that this is with email confirmation DISABLED:
An expected error has occurred trying to send an email notification. Usually, the main reason for this is that the SMTP server properties has not been configured properly. Edit the WEB-INF/app.properties file and verify the SMTP server configuration properties.
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: mail.onkoistudios.com, port: 465, response: -1. Failed messages: javax.mail.MessagingException: Could not connect to SMTP host: mail.onkoistudios.com, port: 465, response: -1; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Could not connect to SMTP host: mail.onkoistudios.com, port: 465, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1270)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
at javax.mail.Service.connect(Service.java:288)
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:355)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:344)
at com.wisemapping.mail.Mailer.sendEmail(Mailer.java:70)
at com.wisemapping.mail.NotificationService.sendTemplateMail(NotificationService.java:118)
at com.wisemapping.mail.NotificationService.newAccountCreated(NotificationService.java:105)
at com.wisemapping.service.UserServiceImpl.createUser(UserServiceImpl.java:139)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy6.createUser(Unknown Source)
at com.wisemapping.ncontroller.UsersController.registerUser(UsersController.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:212)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:643)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1302)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1302)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:167)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1302)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:448)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:499)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1067)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:377)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1001)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:360)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:622)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
at java.lang.Thread.run(Thread.java:619)

pve...@gmail.com

unread,
Nov 1, 2012, 9:31:43 PM11/1/12
to wisemappi...@googlegroups.com, pve...@gmail.com, alane...@gmail.com
Comments inline ...

El jueves, 1 de noviembre de 2012 01:11:24 UTC-3, Onkoi Studios escribió:
> I've played around a bit with these configuration settings, and two things I've run into:
> First, I'm unable to get email sending to work, at all. I'm not sure if this is because my email host is on a different box, or if there are some sort of restrictions put in place by my host...one way or another, the mail isn't getting delivered. Is there any sort of SMTP log generated by WiseMind that I could look through for more information?
>
[Paulo] The issue seems to be related to wrong SMTP configuration based on the stack trace of your email. Did you try using a GMAIL account ?. Email configuration is required for reseting password and sharing.

> Secondly, if I disable email confirmation via the config file, registrations don't work. When someone tries to register, the registration page just sits there, waiting. It doesn't even get to the validation checks, because when I put in the CAPTCHA wrong, it still just sits there, with my browser telling me the page is loading.

[Paulo] Even if you disable the registration email, an email is sent to the user with the details of your account. The problem must be that the SMTP connection is taking some time before failing. That's why it is not responding.

pve...@gmail.com

unread,
Nov 1, 2012, 9:37:26 PM11/1/12
to wisemappi...@googlegroups.com, pve...@gmail.com, alane...@gmail.com
Hi,

The property name "registration.email.enabled" was not clear at all. Sorry for the confusion It caused.
This property only disable the registration confirmation email. However, an email is always is sent when a new account is created. This is the reason why you have an exception in the console.

As explained in the other thread, SMTP configuration is required for reseting the password and sharing. I suggest trying with a Gmail account. If this work, the you should take a look at your server SMTP configuration.

I hope this helps,
Paulo
Reply all
Reply to author
Forward
0 new messages