Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

javax.mail truncated url

Thread view: 
ph0ngwh0ng@at@gmail.dot.com - 31 Oct 2005 20:17 GMT
Hi!

I use javax.mail to send http mails that include urls.  On some mail
clients, including Lotus iNotes, urls contained in the mail are
truncated.  For example:

http://www.crappysite.com/index.html?param1=foo&param2=bar

becomes

http://www.crappysite.com/index.html?param1

Encoding in the email is set to "quoted-printable".  I tried to set it
to "base64" but it didn't resolve the problem.

Thanks!

Alex
Oliver Wong - 31 Oct 2005 20:30 GMT
> Hi!
>
[quoted text clipped - 10 lines]
> Encoding in the email is set to "quoted-printable".  I tried to set it
> to "base64" but it didn't resolve the problem.

   You need to escape the equals character. Quoted Printable and Base 64
are two different formats that coincidentally both treat the '=' character
specially.

   - Oliver
ph0ngwh0ng@at@gmail.dot.com - 31 Oct 2005 20:38 GMT
And I escape with the " \ " ?

Alex
ph0ngwh0ng@at@gmail.dot.com - 31 Oct 2005 20:55 GMT
Ok.  Like that:

http://www.crappysite.com/index.html?me&#61dummy...
ph0ngwh0ng@at@gmail.dot.com - 31 Oct 2005 20:57 GMT
Argh...  I meant the <ampersand>#61..
Oliver Wong - 31 Oct 2005 21:33 GMT
> Ok.  Like that:

[URL snipped]

   Damn... Next time warn me that the link is not work safe. =P I thought
you had posted the code there and wanted me to take a look at it to verify
that it was correct.

   but to answer your question, yes, if that works, you can do that, but
that's not the standard way of escaping the '=' character in either
encoding. If you're gonna go with Base64, it's described in RFCs 1421 and
2045.

http://www.ietf.org/rfc/rfc1421.txt

http://www.ietf.org/rfc/rfc2045.txt

   - Oliver
Roedy Green - 31 Oct 2005 21:16 GMT
On 31 Oct 2005 11:17:56 -0800, "ph0ngwh0ng@at@gmail.dot.com"
<ph0ngwh0ng@gmail.com> wrote, quoted or indirectly quoted someone who
said :

>I use javax.mail to send http mails that include urls.  On some mail
>clients, including Lotus iNotes, urls contained in the mail are
[quoted text clipped - 5 lines]
>
>http://www.crappysite.com/index.html?param1

I suppose need to use a hex viewer to see what Lotus Notes likes and
does not like. Once you know that it will be much easier to tell you
how to encode the URLs to keep it happy.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Roedy Green - 31 Oct 2005 21:46 GMT
On 31 Oct 2005 11:17:56 -0800, "ph0ngwh0ng@at@gmail.dot.com"
<ph0ngwh0ng@gmail.com> wrote, quoted or indirectly quoted someone who
said :

>http://www.crappysite.com/index.html?param1=foo&param2=bar

I would try a simple URLEncode on that prior to any message
level-encoding. It can't hurt.

see http://mindprod.com/jgloss/urlencoded.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.