SMTP Configuration Issue For IP Address

38 views
Skip to first unread message

SAI KUMAR S

unread,
Mar 21, 2023, 1:46:34 AM3/21/23
to DSpace Community
Hi,
The Email configuration in Dspace 6.3
LOCALHOST
##### Email settings ######

# 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 = ****@gmail.com
mail.server.password = 16 digit app password

# 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 = ***@gmail.com

# Name of a pre-configured Session object to be fetched from a directory.
# This overrides the Session settings above.  If none can be found, then DSpace
# will use the above settings to create a Session.
#mail.session.name = Session

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

# General site administration (Webmaster) e-mail
# System notifications/reports and other sysadmin emails are sent to this address
mail.admin =***@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 = ${mail.admin}

# 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.starttls.enable=true, \
mail.smtp.starttls.required=true, \
mail.smtp.ssl.protocols=TLSv1.2

The above Email Configuration has been done for the localhost, this is working properly.

But the issue is when we configure email configuration for particular IP address, this is not working properly.
The ports all are open but we are getting this below issue
Error sending email:
- Error: javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com (java.net.UnknownHostException: smtp.gmail.com))


So please anyone can guide us to solve the problem.

Thanks & Regards
   Sai Kumar S

Tim Donohue

unread,
Mar 21, 2023, 12:25:11 PM3/21/23
to DSpace Community
Hi Sai,

This sounds like a possible firewall or antivirus which is blocking the request.  Or the server somehow isn't on the internet.  The error "Unknown SMTP host: smtp.gmail.com" basically means your server cannot figure out what "smtp.gmail.com" is or how to contact it.

Tim

Reply all
Reply to author
Forward
0 new messages