Hi All; I have to send mail to ABC@MAIL.COM@SECURE address using java mail API to lotus notes server 5.0 But the java mail APi is throwing exception about invalid mail address. How can i solve this problem........... thanks a ton arun
You only have two address types defined in the JavaMail API: InternetAddress and NewsAddress. Normally you would send a message with an InternetAddress - which has loose SMTP address validation (I say loose, since it will allow addresses with no '@' symbol, so not 100% RFC 821 compliant). So creating an InternetAddress will parse your ABC@MAIL.COM@SECURE address and fail, because it is not a valid SMTP mail address. Lotus Notes is more than just an SMTP compliant server - hence a Notes address is different from an SMTP address. You can use Notes 5+ as just an SMTP server and it will work with the JavaMail api, but to do this you must use SMTP compliant mail addresses i.e. 'local-part "@" domain'. What you have to ask is if you need any more functionality from Notes than just sending email(authentication perhaps, since SMTP is insecure by design?). If you don't, then you will need to convert a Notes address into an SMTP address - then everything should work fine. If however you do, then you will need to write a Transport implementation and an Address implementation for Notes. And since no one has done this yet, I suspect it might be quite an awkward job.