unable to setup email in dspace 7.2

35 views
Skip to first unread message

sanjay kumar

unread,
Mar 16, 2023, 1:41:18 PM3/16/23
to DSpace Community
Hi,

getting error 

Error sending email:
 - Error: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 587;
  nested exception is:
        javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

below is my local.cfg detail for email configuration:-

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

# SMTP mail server (allows DSpace to send email notifications)
mail.server = smtp.gmail.com

# SMTP mail server authentication username and password (if required)
mail.server.username = a...@gmail.com
mail.server.password = abc@123

# SMTP mail server alternate port (defaults to 25)
mail.server.port = 587

# From address for mail
# All mail from the DSpace site will use this 'from' address
mail.from.address =  a...@gmail.com

# When feedback is submitted via the Feedback form, it is sent to this address
# Currently limited to one recipient!
feedback.recipient =  a...@gmail.com

# General site administration (Webmaster) e-mail
mail.admin =  a...@gmail.com

# Recipient for server errors and alerts (defaults to mail.admin)
#alert.recipient = ${mail.admin}

# Recipient for new user registration emails (defaults to unspecified)
#registration.notify =


# Set the default mail character set. This may be overridden by providing a line
# inside the email template "charset: <encoding>", otherwise this default is used.
#mail.charset = UTF-8

# A comma-separated list of hostnames that are allowed to refer browsers to email forms.
# Default behaviour is to accept referrals only from dspace.hostname
#mail.allowed.referrers = ${dspace.hostname}

# Pass extra settings to the Java mail library. Comma-separated, equals sign between
# the key and the value. For example:
mail.extraproperties = mail.smtp.socketFactory.port=587, \
                       mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory, \
                       mail.smtp.socketFactory.fallback=false, \
                       mail.smtp.starttls.enable=true

and if i comment extraproperties than getting 
Error sending email:
 - Error: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. p12-20020aa7860c000000b005cd81a74821sm5538109pfn.152 - gsmtp


please help.

Thanks
maneesh
Reply all
Reply to author
Forward
0 new messages