8 Replies Latest reply: May 12, 2010 9:02 AM by 793415 RSS

    java mail

    807580
      Hi,

      I'm using Java Mail.

      I'm sending a mail to someone but before that I have to check, the email id to which I'm sending the mail is exist or not.

      Please tell me if you know this thing.

      Thanks
      Gaurav Agrawal
        • 1. Re: java mail
          PhHein
          It's impossible.
          • 2. Re: java mail
            807580
            Even, there is no exception so that I can handle this.

            It show message like "mail has been sent".

            I think, there should be something.
            • 3. Re: java mail
              PhHein
              But there isn't anything.
              Change the message to "mail has maybe been sent".
              • 4. Re: java mail
                807580
                gauravjlj wrote:
                Even, there is no exception so that I can handle this.

                It show message like "mail has been sent".

                I think, there should be something.
                There is nothing. Mail is a fire-and-forget protocol. This is not programming language dependent. The mail server you post through might send a response after several hours to say that the mail could not be delivered but it is not even obligated to do that.
                • 5. Re: java mail
                  807580
                  but on the gmail when we send the mail on non-exist account, it sends the failure message. how it could be done then.
                  • 6. Re: java mail
                    JoachimSauer
                    gauravjlj wrote:
                    but on the gmail when we send the mail on non-exist account, it sends the failure message. how it could be done then.
                    The mail address you used as the sender may get an email notifying it of the failure to deliver (however, sometimes no such email is sent, even if delivery fails!). You could look for that.
                    • 7. Re: java mail
                      807580
                      Thanks a lot to confirm these things..........
                      • 8. Re: java mail
                        793415
                        sabre150 wrote:
                        ..The mail server you post through might send a response after several hours to say that the mail could not be delivered but it is not even obligated to do that.
                        There was an active push some time ago to get servers to not send such notifications, as doing so was indirectly encouraging spammers. E.G. Try a million addresses at a server, and then remove all the ones you get a 'cannot deliver' message from. The ones left are 'good to spam'.