Sending a Faxination email from JavaMail; invalid address error
posted 12 years ago
We need to send emails to the faxination process from our Java code. The email To: format is as follows [FAX: JOHN DOE@15550001111]
The faxination process takes out the phone number from the above address and e-faxes to it. We could do this successfully by sending direct email from Outlook but when the java code is trying to send this email it gets "invalid address" exception. We have tried setting
but that doesnt help.
We are pretty much stuck here ...Has anyone done this before? Any ideas? I appreciate your help.
You address is invalid because it contains white space (I'd have though your AddressException whould point this out - didn't it?). RFC822 allows white spaces onle is in a quoted string. So "JOHN DOE"@15550001111 is a valid address, but JOHN DOE@15550001111 is not.