Lilianne E. Blaze wrote:
> Guillaume Lerouge wrote:
>> Hi Lilianne,
>> thanks for the great work !
>>
>> Regarding your issues with setting the email's subject, I think the
>> MailSenderPlugin API should give you an answer :
>> http://code.xwiki.org/xwiki/bin/view/Plugins/MailSenderPlugin
> 
> I know how to set it.
> 
> The thing is, XWiki.sendMessage doesn't have 'subject' parameter, and in 
> Admin Prefs there are text areas for mail content, but none for mail 
> subject.
> 

The way it used to work before is that the first few lines of the message can 
be additional headers, 
so you would send a message like:

Subject: this is the subject
OtherHeaders: value

Hi, this is the mail content.

You could try to "parse" the message content and see if it starts with 
something that looks like 
headers, and if among those headers there's a Subject.


Another solution is to augment the sendMessage API, but I'm against it, as it 
is already deprecated 
and should not be used anymore, so definitely not enhanced.
-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to