• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

strange mail when sent from tomcat

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
I have strange problem with sending mails.

I'm trying to send mail with subject: asda as da íáýěíšáýčěíš ěščíáýěší and text: <html><body>asdkasjhdakjshd askjdhaskjd asdkajs a asdkas a áěýšžčě ěášýčž ěšáčý žáěščž áěžčš áěžščá žěšáčý žáěšž áýěšžčáěšžčá

https://server/context/action.do?code=cba6b808d8f843d7afdbdd923c00591e</body></html>

When developed it, I used junit test started from intellij idea.

When I run the test now, I get correct mail (mail source below).
When I deploy final web app to tomcat (5.5.20) I get strange mail. There's BC field instead TO. No subject and strange text received. (source below).

Code that I use for sending is:
MimeMessage message = sender.createMimeMessage();

MimeMessageHelper helper = new MimeMessageHelper(message, false, "windows-1250");

helper.setFrom(from);
helper.setTo(to);
if (cc.length > 0) {
helper.setCc(cc);}
if (bcc.length > 0) {
helper.setBcc(bcc);
}

helper.setSubject(subject);
helper.setText(text, html);

sender.send(message); //JavaMailSenderImpl

correct mail source:
Return-path: <aaa@seznam.cz>
Received: from novell.com (hoex.provo.novell.com [130.57.1.153])
by sinclair.provo.novell.com with ESMTP; Wed, 24 Jun 2009 13:35:52 -0600
Received: from smtp.seznam.cz not authenticated [77.75.72.43]
by novell.com with M+ Extreme Email Engine 2008.4.debug;
Wed, 24 Jun 2009 13:35:51 -0600
X-MailFrom: [email]aaa@seznam.cz[/email]
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=seznam.cz;
h=Received:Date:From:To:Message-ID:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Smtpd:X-Seznam-User:X-QM-Mark;
b=ZsVqEYM1ub95oV/rYXCMT9gXN0+VMjSd4nvonHVw8NEDemXYN4aIOkk1X+0iXR2z1
Xp3htFC72dGl3AUPltDDRTQbB89igNVvPtp1167Z61KT9J/EbVwdhSDjo4RFl1XQ2Pl
cOqZVGdA/PLSV+Se1l6ChETsntxC6ZyoYpK2E8k=
Received: from aaa-laptop (assigned-81-0-211-210.casablanca.cz [81.0.211.210])
by email-relay1.go.seznam.cz (Seznam SMTPD 1.1.7@13984) with ESMTP;
Wed, 24 Jun 2009 21:35:49 +0200 (CEST)
Date: Wed, 24 Jun 2009 20:35:49 +0100 (GMT+01:00)
From: [email]aaa@seznam.cz[/email]
To: [email]abc@mail.com[/email]
Message-ID: <31115429.01245872149216.JavaMail.aaa@aaa-laptop>
Subject: =?windows-1250?B?YXNkYSBhcyBkYSDt4f3s7Zrh/ejs7Zog7Jro7eH97Jrt?=
MIME-Version: 1.0
Content-Type: text/html;charset=windows-1250
Content-Transfer-Encoding: quoted-printable
X-Smtpd: 1.1.7@13984
X-Seznam-User: [email]aaa@seznam.cz[/email]
X-QM-Mark: email-qm3<214459661>

<html><body>asdkasjhdakjshd askjdhaskjd asdkajs a asdkas a =E1=EC=FD=9A=9E=
=E8=EC =EC=E1=9A=FD=E8=9E =EC=9A=E1=E8=FD =9E=E1=EC=9A=E8=9E =E1=EC=9E=E8=
=9A =E1=EC=9E=9A=E8=E1 =9E=EC=9A=E1=E8=FD =9E=E1=EC=9A=9E =E1=FD=EC=9A=9E=
=E8=E1=EC=9A=9E=E8=E1

<a <br /> 3c00591e" rel="nofollow">https://server/context/action.do?code=3Dcba6b808d8f843d7afdbdd923=
c00591e</body></html>

bad mail source:
Return-path: <aaa@seznam.cz>
Received: from novell.com (lasca.provo.novell.com [130.57.1.152])
by sinclair.provo.novell.com with ESMTP; Wed, 24 Jun 2009 13:28:03 -0600
Received: from smtp.seznam.cz not authenticated [77.75.72.43]
by novell.com with M+ Extreme Email Engine 2008.4.debug;
Wed, 24 Jun 2009 13:28:03 -0600
X-MailFrom: [email]aaa@seznam.cz[/email]
Received: from aaa-laptop (assigned-81-0-211-210.casablanca.cz [81.0.211.210])
by email-relay2.go.seznam.cz (Seznam SMTPD 1.1.7@13984) with ESMTP;
Wed, 24 Jun 2009 21:28:01 +0200 (CEST)
X-Smtpd: 1.1.7@13984
X-Seznam-User: [email]abc@seznam.cz[/email]
X-QM-Mark: email-qm2<435151721>

<html><body>asdkasjhdakjshd askjdhaskjd asdkajs a asdkas a =E1=EC=FD=9A=9E=
=E8=EC =EC=E1=9A=FD=E8=9E =EC=9A=E1=E8=FD =9E=E1=EC=9A=E8=9E =E1=EC=9E=E8=9A=
=E1=EC=9E=9A=E8=E1 =9E=EC=9A=E1=E8=FD =9E=E1=EC=9A=9E =E1=FD=EC=9A=9E=E8=E1=
=EC=9A=9E=E8=E1

<a <br /> c00591e" rel="nofollow">https://server/context/action.do?code=3Dcba6b808d8f843d7afdbdd923c0=
0591e</body></html>

I'm not able to resolve problem.
Can someone give me an advice?

Thanks
blaf
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's the connection to Spring (which is what this forum is all about)?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure if this will work, but do you sometimes have to URLEncode some Strings? Just an idea I am throwing out there with no basis behind the suggestion.

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic