Hi Bryce,

It could be that your server is firewalled from talking to external servers. 
Log into your server, and try the following:

> telnet smtp.gmail.com 465

If your server can connect then you should see a message such as:

Trying 72.14.213.109...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.


If you get an error about 'Connection Refused' or 'Unable to connect' (or 
similar) then it may be a firewall issue.

Thanks,


Stuart Lewis
IT Innovations Analyst and Developer
Te Tumu Herenga The University of Auckland Library
Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand
Ph: +64 (0)9 373 7599 x81928


On 8/06/2010, at 9:52 AM, bryce ray wrote:

> I'm getting the following error when attempting to connect to the Gmail smtp 
> server:
> 
> javax.mail.MessagingException: Could not connect to SMTP host: 
> smtp.gmail.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:297)
>         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:362)
>         at 
> org.dspace.eperson.AccountManager.sendEmail(AccountManager.java:296)
>         at org.dspace.eperson.AccountManager.sendInfo(AccountManager.java:256)
>         at 
> org.dspace.eperson.AccountManager.sendRegistrationInfo(AccountManager.java:101)
>         at 
> org.dspace.app.webui.servlet.RegisterServlet.processEnterEmail(RegisterServlet.java:287)
>         at 
> org.dspace.app.webui.servlet.RegisterServlet.doDSPost(RegisterServlet.java:202)
>         at 
> org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:147)
>         at 
> org.dspace.app.webui.servlet.DSpaceServlet.doPost(DSpaceServlet.java:105)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>         at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
>         at 
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
>         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
>         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
>         at 
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
>         at 
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
>         at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
>         at java.lang.Thread.run(Thread.java:619)
> 
> I'm running Dspace v1.5.2.  I've been following the tutorial that I found 
> here: http://blog.stuartlewis.com/2009/09/05/using-gmail-with-dspace/
> 
> I've applied this patch to my Email.java file and re-packaged:
> http://jira.dspace.org/jira/browse/DS-234
> 
> Below is my dspace.cfg file as it pertains to the mail settings:
> 
> ##### Email settings ######
> 
> # SMTP mail server
> mail.server=smtp.gmail.com
> 
> # SMTP mail server authentication username and password (if required)
> mail.server.username = [email protected]
> mail.server.password = password
> 
> # SMTP mail server alternate port (defaults to 25)
> mail.server.port = 465
> 
> # From address for mail
> mail.from.address = [email protected]
> 
> # Currently limited to one recipient!
> feedback.recipient = [email protected]
> 
> # General site administration (Webmaster) e-mail
> mail.admin = [email protected]
> 
> # Recipient for server errors and alerts
> # alert.recipient = email-address-here
> 
> # Recipient for new user registration emails
> # registration.notify = email-address-here
> 
> # Set the default mail character set. This may be over ridden by providing a 
> line
> # inside the email template "charset: <encoding>", otherwise this default is 
> used.
> #mail.charset = UTF8
> 
> mail.ssl.enable = true
> 
> mail.extraproperties = mail.smtp.socketFactory.port=465, \
>         mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory, \
>         mail.smtp.socketFactory.fallback=false
> 
> # Default language for metadata values
> default.language = en_US
> 
> Any suggestions on what might be causing the problem here? I've tried 
> connecting to 1 other smtp server and received the same error message.  I 
> have double checked the username and password for the smtp server and it 
> appears to be correct.
> <ATT00001..txt><ATT00002..txt>



------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to