Hi,
Maybe it's caused by
http://jira.xwiki.org/jira/browse/XE-913?
What exact version of XE are you using?
Thanks
-Vincent
On Jul 8, 2011, at 10:58 AM, goldring, richard wrote:
Hi,
I've set up my email server (sendmail) on my Solaris server and set the
appropriate setting in XWiki to talk to it and using the code below (taken
from the XWiki website) to successfully send an email:
{{velocity}}
#if($xwiki.hasAccessLevel('admin'))
#if("$!{request.action}" == 'send_mail' &&
"$!{request.lastname}" == '')
## Check submission and honey pot.
#if("$!request.recipient" != '' &&
"$!request.subject" != '')
#set($result = $xwiki.mailsender.sendTextMessage("no-reply(a)xwiki.com
<mailto:no-reply@xwiki.com> ", $request.recipient, $request.subject,
"$!request.message"))
#if($result == -1)
{{error}}A problem occurred while sending the mail.{{/error}}
#else
{{info}}Everything went OK.{{/info}}
#end
#else
{{error}}Please specify at least a recipient and a subject{{/error}}
#end
#end
{{html wiki=true}}
<form action="" method="post">
<input name="action" value="send_mail" type="hidden"
/>
## this is a honey-pot hidden text field hat hopefully robots will not
leave empty
<div class="hidden">
<input name="lastname" type="text" />
</div>
<fieldset>
**TO:**<br />
<input type="text" name="recipient" /><br />
**SUBJECT:**<br />
<input type="text" name="subject" /><br />
**MESSAGE:**<br />
<textarea name="message" style="width:99%;" rows=10>Your test
message
here.</textarea>
</fieldset>
<div>
<span class="buttonwrapper"><input type="submit"
class="button"
value="Send" /></span>
</div>
</form>
{{/html}}
#else
{{error}}Oops. Area restricted to Admins, sorry.{{/error}}
#end
{{/velocity}}
BUT ..... in my XWiki wiki (I have the latest version) when I select to
email a wiki page and press the Send button nothing seems to happen (I
assume the email dialog should close when you press the Send button and an
email should be sent), also when adding a Watch on the wiki or wiki page and
the page is changed then no email is sent to the user who has put the watch
on the page .... does anyone know why the emails aren't getting sent????
Having the facility to email a wiki page and to watch wiki pages would
certainly help get more people to use our wiki.
Regards,
Richard