[Desktop Entry]











저작자 표시

'System > Linux' 카테고리의 다른 글

linux - plank.desktop  (0) 2017.12.15
linux - LWP and Java thread  (0) 2017.03.16
fedora - timedatectl  (0) 2016.12.17
linux - LWP  (0) 2016.12.16
linux - dnf broken  (0) 2016.12.04
linux - chmod  (0) 2016.09.03
Posted by linuxism

* Create and verify a private key

$ openssl genrsa -aes256 -out private_key.pem 2048

$ openssl rsa -noout -text - in private_key.pem

* Create a CSR

$ openssl req -new -key private_key.pem -out test.csr

* Create and verify a self-signed certificate

$ openssl x509 -in test.csr -out test.crt -req -signkey private_key.pem -days 3560

$ openssl x509 -noout -text -in test.crt

저작자 표시

'Development > Common' 카테고리의 다른 글

Using the OpenSSL toolkit  (0) 2017.09.17
Date and Time Formats  (0) 2016.06.28
development - 개행문자  (0) 2016.03.02
매개변수(parameter)와 전달인자(argument)  (0) 2015.09.20
software release life cycle  (0) 2015.08.03
programming - read–eval–print loop (REPL)  (0) 2015.07.24
Posted by linuxism

It means that the receiving server does not recognise the mailbox (the part before the '@') of the e-mail address. It could be that it was misspelled, that it is simply a non-existing name, or it could even be that the receiving server was set to reject a message (e.g. spam) by replying with code 550.

Here is one of many pages that summarises the SMTP reply codes, and gives links to various relevant RFCs: http://www.greenend.org.uk/rjk/tech/smtpreplies.html.

EDIT: I need a bit more space to answer your question than the comments allow.

@RaghuKing, if you look at the Javadoc for javax.mail.SendFailedException, you will notice that you can call 3 methods on such an exception object (inside the catch block):

  • getInvalidAddresses() to get an array of addresses that are invalid and thus not sent to,
  • getValidSentAddresses() to get an array of addresses to which this message was sent succesfully, and
  • getValidUnsentAddresses() to get an array of addresses that are valid but to which the message was not sent to.

(Obviously, if one sends a message to multiple recipients, some may succeed and some fail, but the exception is thrown if there is at least one failure, regardless of how many successes. Obviously also if you are sending to only one address, you will have that one address in only one of these arrays, and it will probably NOT be in the ValidSent list.

These arrays will give you more information how to handle the exception, depending of the type of array an address is in. This will obviously depend on you application, but these might be reasonable suggestions:

  • Invalid Addresses: tell the user that the message was not sent because the address was wrong, for each invalid address in the list, and provide a way to correct the address, then try to resend to the correct address (or cancel if the user does not provide a different address);
  • Valid Sent Addresses: Don't resend;
  • Valid Unsent Addresses: Try to resend to these addresses. Sending probably stopped before getting to these addresses because of a previous incorrect address.

But in the end it is you who has to apply common sense, and perhaps experiment a little with the functions you don't understand until you understand them.

source - http://stackoverflow.com/questions/15131868/how-resolve-address-invalid-exception

저작자 표시

'Development > Java' 카테고리의 다른 글

javamail - SendFailedException  (0) 2017.04.06
javamail - SMTP BCC  (0) 2017.03.31
java - NIO Selector and epoll  (0) 2017.03.17
java - Architecture of a Highly Scalable NIO-Based Server  (0) 2017.03.17
java - Understanding JUnit's Runner architecture  (0) 2016.07.24
java8 - Metaspace  (0) 2016.02.27
Posted by linuxism