You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Grzegorz TaĆczyk <go...@polzone.pl> on 2004/10/23 16:37:18 UTC
Sendmail taglib content-type
Hello Users,
I have a problem with Sendmail logicsheet. I don't know how to
change content-type from text/plain to text/html.
Here is code which is not working properly:
org.apache.cocoon.mail.MailSender _sendmail_mms = null;
try { _sendmail_mms = (org.apache.cocoon.mail.MailSender) this.manager.lookup(org.apache.cocoon.mail.MailSender.ROLE); }
catch (org.apache.avalon.framework.component.ComponentException e) { throw new ProcessingException("Could not setup mail components.", e); }
_sendmail_mms.setSmtpHost("localhost");
_sendmail_mms.setTo(temp_email);
//########
_sendmail_mms.setSubject(subject);
//========
_sendmail_mms.setFrom("robot@mydomain.com");
_sendmail_mms.setCharset("UTF-8");
_sendmail_mms.setBody(message);
//########
_sendmail_mms.setBodyFromSrcMimeType("text/html"); // this part is not working
//========
_sendmail_mms.sendIt(resolver);
this.manager.release((org.apache.avalon.framework.component.Component) _sendmail_mms);
What is wrong with setBodyFromSrcMimeType method? Of course many
mail clients will display message as HTML, but for example Outlook
don't want to.
Second question is about setSubject method. Why subject of sent
message is corrupted? I see "?" instead of secial
characters from polish alphabet. Did I miss something?
thanks for any help
--
Best regards,
Grzegorz mailto:goliatus@polzone.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org