Hi Bryce,

This is SSL error.

You need to add some properties in Email.java

Which Dspace version are you using ?

Thanks &  Regards
Hardik Mishra
Software Engineer

Give a man a fish, and you feed him for a day. Teach a man to catch fish and
you feed him for a lifetime.


On Tue, Jun 8, 2010 at 8:20 PM, bryce ray <[email protected]> wrote:

> When changing it to port 587 it gives me a new error and still does not
> succeed in sending an email.
>
> *com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a
> STARTTLS command first. a8sm26133363ibi.11
>
>         at
> com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
>         at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
>         at
> com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
>         at javax.mail.Transport.send0(Transport.java:169)
>
>         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 also want to note that when the original error occurs it takes about 120
> seconds to process the email command before it gives up and issues an
> internal error.  When I changed the port to 587 it was almost instant.
>
> On Tue, Jun 8, 2010 at 12:12 AM, Hardik Mishra <[email protected]>wrote:
>
>> Hi Bryce
>>
>> Please try to connect with port no. 587
>>
>>
>> Thanks &  Regards
>> Hardik Mishra
>> Software Engineer
>>
>> Give a man a fish, and you feed him for a day. Teach a man to catch fish
>> and you feed him for a lifetime.
>>
>>
>>
>> Message: 4
>> Date: Mon, 7 Jun 2010 20:14:52 -0500
>> From: bryce ray <[email protected]>
>> Subject: Re: [Dspace-tech] Unable to connect to Gmail SMTP server
>> To: Stuart Lewis <[email protected]>
>> Cc: "[email protected]"
>>        <[email protected]>
>> Message-ID:
>>        <[email protected]>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> I just double checked but i do not think it has to do with a server
>> setting/firewall.  I can connect to the gmail server without problem on my
>> apache based applications.  Its dspace/tomcat specifically which I can not
>> connect to the gmail server.
>>
>> On Mon, Jun 7, 2010 at 7:23 PM, Stuart Lewis <[email protected]>
>> wrote:
>>
>> > 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
>>
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>>
>>
>
------------------------------------------------------------------------------
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