How to send messages to "incorrect" email addresses?

Hi everyone
I hope, I'm not repeating a topic that was discussed before...
My problem:
I need to send emails to a email to facs gateway to have them delivered to the recipient by facs. The sytax for the gateway (product name Faxination) is
[fax:username@faxnumber] or
[fax:faxnumber]
and will be parsed by the facs gateway.
Of course, such email addresses are illegal in terms of RFC822 and thus cannot be parsed correctly into InternetAddress objects.
To ommit the parsing of the address, I subclassed javax.mail.internet.InternetAddress to be able to access the protected member directly to inject my addresses into a derived object of InternetAddress. So far, everything worked, but unfortunately the Transport.send() method checks all recipients by calling the static method InternetAddress.parse(String) on them for reasons I cannot really follow...
The problem is: subclassing is inadequate here because I cannot override static methods.
I would have been nice from the designers of JavaMail and the standard mail provider from Sun to allow a user to reasonably subclass InternetAddress to provide the means to allow illegal addresses to be handled without checking them first.
Does anyone know a solution to that problem?
Any hint is appreciated.
Daniel

Reading through the JavaDoc for JavaMail 1.3 I found the following constructor for InternetAddress.
InternetAddress
public InternetAddress(java.lang.String address,boolean strict)
throws AddressExceptionParse the given string and create an InternetAddress.
If strict is false, the detailed syntax of the address isn't checked.
Parameters:
address - the address in RFC822 format
strict - enforce RFC822 syntax
Throws:AddressException - if the parse failed
Since: JavaMail 1.3
http://java.sun.com/products/javamail/1.3/docs/javadocs/javax/mail/internet/InternetAddress.html

Similar Messages

Maybe you are looking for

  • Re: Not printing black ink after new ink cartridge installed (HP Officejet Pro (edited)

    Well 1 to 2 years later I have the exact same problem described by the posters with my OfficeJet 4020.  My black printing started to deteriorate as the cartridge went empty, put in the same HP cartridges I have been buying at Costco since I bought th

  • View pdf on Treo Pro

    I receive pdf documents created by Oracle pdf creator and the Adobe Reader version 2.5 supplied with the Treo Pro opens blank pages. If I open them on my pc and resave them using Adobe Acrobat Pro then transfer them back to the Treo Pro I can view th

  • After upgrading my iPad it will not print to wireless printer?

    I was printing to a wireless hp printer no problem. After upgrading iPad to os5 can't print? The hp printer is a supported model??

  • Adobe reader not working. Can anybody help?

    I am using a Nokia E63 device. Adobe Reader came preloaded in the device. I recently formatted my phone and when i backed it up, my pdf files won't open. Whenever i try to open any pdf file it says 'unable to open file!'. I tried accessing the Adobe

  • Attachments help - C# using Obect API

    I'm in my first attempt at integrating GW functionality into a C# application. I am not an expert C# programmer either. Thus far I've been successful at getting logged into GW, creating a new mail message and sending it successfully. However adding c