BTW, no mail.jar or activation.jar in the lib directory as well.


Aakhunaten wrote:
> 
> I did. There are no exceptions and the body and subject is being sent.
> Also, the issue is only with emails with HTML content; plain text emails
> do reach the recipient (subject, body all in place). I am really at a loss
> now... its been 3 days since I have been trying to solve this issue. 
> 
> Aakhunaten
> 
> 
> 
> 
> 
> mraible wrote:
>> 
>> Have you tried debugging the application? You might ensure that Tomcat
>> doesn't have any mail.jar/activation.jar in its classpath.
>> 
>> Matt
>> 
>> On Mon, Oct 20, 2008 at 8:12 AM, Aakhunaten <[EMAIL PROTECTED]> wrote:
>>>
>>> I am trying to send HTML emails using gmail smtp. The app is hosted in
>>> tomcat6. The code i use is the same as specified in the spring
>>> documentation
>>> and looks like this
>>>
>>> public void sendHtmlMessage(final SimpleMailMessage mailMessage, final
>>> String templateName, final Map<String, Object> model) throws
>>> MessagingException {
>>>        MimeMessagePreparator preparator = new MimeMessagePreparator() {
>>>
>>>            public void prepare(MimeMessage mimeMessage) throws Exception
>>> {
>>>                MimeMessageHelper message = new
>>> MimeMessageHelper(mimeMessage);
>>>                message.setTo(mailMessage.getTo());
>>>                message.setFrom(mailMessage.getFrom());
>>>                message.setSubject(mailMessage.getSubject());
>>>                String text =
>>> VelocityEngineUtils.mergeTemplateIntoString(
>>>                        velocityEngine, templateName, model);
>>>                message.setText(text, true);
>>>            }
>>>        };
>>>
>>>        ((JavaMailSenderImpl) mailSender).send(preparator);
>>>    }
>>>
>>> Emails get sent out perfectly when running maven / jetty, but when the
>>> app
>>> runs inside TomCat6, a blank email is sent. (No subject/no body)
>>>
>>> Did anyone get this issue? Is there a fix for this? I have tried
>>> everything
>>> found by searching the net, nothing works!
>>>
>>> Thanks in advance,
>>> aakhunaten
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Issue-sending-HTML-emails-tp20068214s2369p20068214.html
>>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Issue-sending-HTML-emails-tp20068214s2369p20092689.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to