Sales, G. (Grant) wrote:
> Looked at the code.
>
> Not really sure if I understand all that.
> Is there a more simple way to send an HTML copy of the new page created?
You can use the watchlist app but you can't customize it as much.
http://code.xwiki.org/xwiki/bin/view/Applications/WatchlistApplication
> Example: I built a FAQ page, and just want the new questions to go to a
> single specific email address for alert purposes.
>
> I also don't really know where to load the plugin or how to call in in
> the document.
The plugin is loaded by default.
#set($mailSender = $xwiki.get('mailsender'))
and you have it.
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf
> Of Caleb James DeLisle
> Sent: Friday, June 04, 2010 12:58 PM
> To: XWiki Developers
> Subject: Re: [xwiki-devs] Calling Email from user
>
>
>
> Sales, G. (Grant) wrote:
>>
>>
>> Also would like to know if there is a way to add some hidden code in
>> this template so when the user saves the new page it will also email
>> it to my boss. (defined email or the xwiki admin email)
>
> Here's what you will be using:
> http://code.xwiki.org/xwiki/bin/view/Plugins/MailSenderPlugin
> This is an implementation of it similar to what you need:
> http://code.xwiki.org/xwiki/bin/view/Applications/SendPageByEmailApplica
> tion
>
>>
>> {{velocity}}{{html}}
>> #set ($userDoc = $xwiki.getDocument($doc.author))
>> #set ($userObj = $userDoc.getObject('XWiki.XWikiUser'))
>> #set ($userProp = $userObj.get('email'))
>> #set ($userEmail = $userProp.getValue())
>> $doc.display('userEmail')
> This is going to look for a property in the doc's "current object"
> called "userEmail". You have userEmail stored in $userEmail so you
> probably want to go
> $escapetool.xml($userEmail)
>
> $escapetool.xml just escapes the xml entities since you are in an html
> block.
>
>> $userEmail
>> <table>
>> <tr>
>> <td>Posted
>> by:<td>$xwiki.getLocalUserName($doc.creator)<td>$xwiki.formatDate($doc
>> .c reationDate, "EEEE")<td>$xwiki.formatDate($doc.creationDate,
>> "MM.dd.yyyy kk:mm:ss z") </tr><tr>
>> <td>Modified
>> By:<td>$xwiki.getLocalUserName($doc.author)<td>$xwiki.formatDate($doc.
>> da te, "EEEE")<td>$xwiki.formatDate($doc.date, "MM.dd.yyyy kk:mm:ss
>> z") </tr> </table>
>>
>> {{/html}}{{/velocity}}
>>
>> Still isn't working (or I don't know how to display it right).
>> Basically all I need is to add the top into my table once I can get it
> working.
>> Above is my table, this is just a part of the page that I built but
>> the code alone should be working. If you know how to get ride of the
>> table lines too that would be a great help!
>>
>> But thanks Guillaume!
>> Is there a place I can go other then FAQ, Code snipets on the
>> xwiki.org that I can go to look up all this info on syntax and stuff.
>> Sort of a how to learning book is what I'm looking for but can't seem
>> to find any useful info besides the devs@ mailing list.
>>
>>
>> ~Grant
>>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]] On Behalf
>
>> Of Guillaume Lerouge
>> Sent: Friday, June 04, 2010 09:20 AM
>> To: XWiki Developers
>> Subject: Re: [xwiki-devs] Calling Email from user
>>
>> Hi,
>>
>> On Fri, Jun 4, 2010 at 16:11, Sales, G. (Grant)
>> <[email protected]>wrote:
>>
>>> $xwiki.user.eamil = current user's email address
>>> $xwiki.getLocalUserName($doc.author) = Author's First and Last name
>>> $xwiki.getLocalUserName($doc.creator) = Creator's First and Last name
>>>
>>> How would I get the email address for a document author and or the
>>> last person that modified the document?
>>>
>> #set($userDoc = $xwiki.getDocument($doc.author)) #set($userObj =
>> $userDoc.getObject('XWiki.XWikiUser'))
>> #set($userProp = $userObj.get('email')) #set($userEmail =
>> $userProp.getValue())
>>
>> Guillaume
>>
>> Grant Sales
>>> Security Operations Analyst
>>> ING
>>> 20 Washington Ave South
>>> Minneapolis, MN 55401
>>> Tel: 612.342.7889
>>> Fax: 612.342.3428
>>> Cell: 320.761.0966
>>> Email: [email protected]
>>> www.ing-usa.com
>>> ING. Your future. Made easier. (r)
>>>
>>>
>>>
>>> ---------------------------------------------------------
>>>
>>> NOTICE: The information contained in this electronic mail message is
>>> confidential and intended only for certain recipients. If you are
>>> not
>>> an intended recipient, you are hereby notified that any disclosure,
>>> reproduction, distribution or other use of this communication and any
>
>>> attachments is strictly prohibited. If you have received this
>>> communication in error, please notify the sender by reply
>>> transmission
>>> and delete the message without copying or disclosing it.
>>>
>>>
>>> =====================================================================
>>> = ======================
>>> _______________________________________________
>>> devs mailing list
>>> [email protected]
>>> http://lists.xwiki.org/mailman/listinfo/devs
>>>
>>
>>
>> --
>> Guillaume Lerouge
>> Sales - XWiki SAS
>> Skype: wikibc
>> Twitter: glerouge
>> http://guillaumelerouge.com/
>> _______________________________________________
>> devs mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/devs
>> _______________________________________________
>> devs mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/devs
>> _______________________________________________
>> devs mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/devs
>>
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs