Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP sends mail with iFrame content  RSS feed

 
Nghiem Nguyen
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I want to send an email using java mail that contains <iframe />

I use:
Message msg = new MimeMessage(session);
msg.setSentDate(new Date());
msg.setHeader("X-Mailer", "JavaMailer");
msg.setSubject(MimeUtility.encodeText(subject, "UTF-8", "B"));
msg.setContent(body, "text/html; charset=UTF-8");

and body:
<iframe width='100%' height='100%' scrolling='auto' frameborder='0' src='http://google.com' ></iframe>

but when I receive the email, I always get empty content.

Please help me to find out the problem.

Thanks.
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use [code] tag when you post code with your question ....

Read this Use Code Tag ...
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you checked the raw source of the mail? Does the mail client allow HTML? Have you tried correct HTML that includes proper header tags etc.?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!