Details
-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
6.4.4, 7.1.1
-
None
-
Unknown
-
N/A
-
N/A
-
Description
On both versions:
1. With the admin account, on the administration wiki tab, configure the e-mail server.
2. Leave the "Discard Success Statuses?" checkbox unchecked on 6.4.4 (or pick "NO"" on 7.1.1)
3. Create a new page with the below content:
{{velocity}} #set ($message = $services.mailsender.createMessage("youremail@gmail.com", "subject")) #set ($discard = $message.addPart("text/plain", "text content")) #set ($result = $services.mailsender.send($message)) ## Check if the message was created properly and if we have permissions to send emails #if ($services.mailsender.lastError) {{error}}$exceptiontool.getStackTrace($services.mailsender.lastError){{/error}} #end ## Check if the mail we tried to send has failed to be sent #set ($statuses = $result.statusResult.getByState('FAILED')) #if ($statuses.hasNext()) {{error}}Error: $statuses.next().error{{/error}} #end {{/velocity}}
4. Use a valid e-mail address for the code, instead of "youremail@gmail.com"
5. The e-mail is sent, but the status is not displayed in the administration section.
6. You can find the code here: http://extensions.xwiki.org/xwiki/bin/view/Extension/Test+Mail