[Dspace-tech] Gmail Authentication

63 views
Skip to first unread message

Andy Kirkyla

unread,
Aug 26, 2015, 1:23:30 PM8/26/15
to dspac...@lists.sourceforge.net
Folks,

      I trust all is well. 

      I have been deploying DSpace 4.2 on unix and I am having issues integrating with our gmail server. 

       When I try to create to update a user I get the following error: 

javax.mail.AuthenticationFailedException
	at javax.mail.Service.connect(Service.java:306)
	at javax.mail.Service.connect(Service.java:156)
	at javax.mail.Service.connect(Service.java:105)
	at javax.mail.Transport.send0(Transport.java:168)
	at javax.mail.Transport.send(Transport.java:98)
	at org.dspace.core.Email.send(Email.java:359)
	at org.dspace.eperson.AccountManager.sendEmail(AccountManager.java:262)
	at org.dspace.eperson.AccountManager.sendInfo(AccountManager.java:222)
	at org.dspace.eperson.AccountManager.sendForgotPasswordInfo(AccountManager.java:87)
	at org.dspace.app.xmlui.aspect.administrative.FlowEPersonUtils.processResetPassword(FlowEPersonUtils.java:234)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:160)
	at org.mozilla.javascript.Context.call(Context.java:538)
	at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1833) 
 at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1803) 

I have made the following changes to my build.properties file:

#######################
# EMAIL CONFIGURATION #
#######################

# SMTP mail server
mail.server = smtp.gmail.com

# SMTP mail server authentication username and password (if required)
# mail.server.username = myusername
# mail.server.password = mypassword
mail.server.username= andy 
mail.server.password= XXXXXXX

# SMTP mail server alternate port (defaults to 25)



mail.server.port = 465

I added the Gmail fix suggested on this post (http://blog.stuartlewis.com/2009/09/05/using-gmail-with-dspace/) to my dspace.cfg file:

mail.extraproperties = mail.smtp.socketFactory.port=465,\
           mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory,\
           mail.smtp.socketFactory.fallback=false

Is there anything else I need to do.

Thanks as always for your help.

Andy

Peter Sichilyango Tutu

unread,
Aug 26, 2015, 1:23:35 PM8/26/15
to Andy Kirkyla, dspac...@lists.sourceforge.net

HI Andy, looking at your email configs, I think you should try to  fill the mail.server.username variable with a complete username ,that includes the gmail domain name. I suggest you use  mail.server.username=user...@gmail.com  or whatever address you might be using.

 

Hope that helps..

 

Regards,

 

Peter

Andy Kirkyla

unread,
Aug 26, 2015, 1:23:35 PM8/26/15
to Peter Sichilyango Tutu, dspac...@lists.sourceforge.net
Dear Peter,

       You sir are a genius.

        That worked.

        Thanks.

Andy

Peter Sichilyango Tutu

unread,
Aug 26, 2015, 1:23:37 PM8/26/15
to Andy Kirkyla, dspac...@lists.sourceforge.net

You are welcome Andy. I am glad it worked.

 

Regards,

 

Peter.

Reply all
Reply to author
Forward
0 new messages