I'm having problem to configure JavaMail session in GlassFish 3.1.1 to send email to Exim 4.76 mail server. Both GlassFish and Exim are running in the same CentOS server.
Here is my JavaMail session configuration in GlassFish:
JNDI Name: mail/mailSession
Mail Host: localhost
Default User: glassfish
Default Sender Address: glassfish#mycompany.com
Status: Enabled is checked
Store Protocol: IMAP
Store Protocol Class: com.sun.mail.imap.IMAPStore
Transport Protocol: SMTP
Transport Protocol Class: com.sun.mail.smtp.SMTPTransport
Here is the exception from GlassFish's server log:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 authentication required
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1835)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1098)
at javax.mail.Transport.send0(Transport.java:195)
at javax.mail.Transport.send(Transport.java:124)
In the same Unix user account where the GlassFish is started, I'm able to send email using the following command:
$ exim -v -odf dummy#gmail.com
This is a test message from server.
.
So I assume my Exim mail server is running correctly but my GlassFish?
Any idea of what could be the problem?
You need to configure the session to use SMTP authentication. See this FAQ entry. You can set the session properties when you configure the mail session in GlassFish, and you'll need to supply the username and password when you connect to the server.
Related
I have configured Gmail in SQL Server 2008, and it sends emails properly but after 6 Jun 2022 it does not send emails and shows email status failed with the following error:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 7 (2022-08-03T09:05:17). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required)
This is my configuration property
server name: smtp.gmail.com
port: 587
The server require secure connection : checked
Thanks in advance
Personal Gmail account doesn't allow connecting from "less secure apps" anymore.
Only from Google Workspace accounts (paid). In this case, you have to allow it in administration panel.
I think User Gmail Server Authentication needs to reauthorized
try to reconfigure SQL Server with Gmail.
I'm using SQL Server 2012 Developer edition to test Database Mail functionality. But I'm receiving the below error.
The steps I followed:
Installed e-mail certificate to Trusted root certification authorities.
Tested the e-mail functionality using sa user
Account 1 is using port 587 with SSL.
Account 2 is using port 465 with SSL.
Account 3 is using port 25 without SSL.
All accounts are with Basic authentication ( the user name and password is cross verified).
The mail could not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 1 (2021-09-01T15:45:56). Exception Message: Cannot send mails to mail server. (The remote certificate is invalid according to the validation procedure.).
Sending Mail using Account 2 (2021-09-01T15:47:36). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
Sending Mail using Account 3 (2021-09-01T15:47:57). Exception Message: Cannot send mails to mail server. (Service not available, closing transmission channel. The server response was: Cannot connect to SMTP server xxx.xx.xx.xx (xxx.xx.xx.xx:25), connect error 10060).
I am trying to configure Database Email on RDS for SQL Server.
I used this guide https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.DBMail.html
I am using existing, working SES credentials (used currently in EC2 instance)
The outbound security group rule is 0.0.0.0/0
When trying to send a email I get the below error:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 6 (2021-02-25T20:57:01). Exception Message: Could not connect to mail server. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [aws ip]:587).
)
Any other ideas on this one?
The solution was to set up a VPC Endpoint
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-set-up-vpc-endpoints.html#send-email-set-up-vpc-endpoints-procedure
I have tried sending reports through mail extent report and emailable report but it's always sending the previous report. I have to send mail through my local system.
You can use SMTP protocol, to send mail from Local System . You can use Google SMTP IP and Port.
The SMTP password is the same as your web password, unless you are using 2SV.
Use smtp.gmail.com, port 465, SSL or port 587/STARTTLS.
I'm try to send email with sql server ,for that purpose config with this way smtp:
Outgoing mail server(SMTP)
___________________________________ E-mail address:myEmail#gmail.com DisplayName:behzad ServerName:smtp.gmail.com PortNumber:587
Enable:This server requeires a secure connection (SSL)
____________________________________ SMTP Authentication - Basic Authentication UserName:myEmail#gmail.com Password:my Email Password
But when try to send simple mail get this error: The mail could
not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 2 (2017-04-05T10:57:35). Exception
Message: Cannot send mails to mail server. (The SMTP server requires a
secure connection or the client was not authenticated. The server
response was: 5.5.1 Authentication Required. Learn more at).
read any help on internet and enable two step verification gmail and...
but so get that error.How can i solve that problem?thanks.