Re: [xwiki-users] some problems with SendPageByEmail Application
Oops! I've just tried with guest without doing this change and it allowed me to send messages... :-( Could you figure out why? From field: XWikiGuest. Fixed ;-) http://code.xwiki.org/xwiki/bin/download/Applications/SendPageByEmailApplicationDownloads/Panels.SendPageByEmail3.xar Guillaume ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] some problems with SendPageByEmail Application
Hi Ricardo, Any Velocity statement I've tried with generates the same error. Perhaps if must be avoided to send Velocity code and send instead a warning or something like that. Just an idea. It seems that $doc.getRenderedContent() doesn't like this Velocity stuff. Please, do you know how this error could be avoided? I am planning to use it a site where we many pages uses the code snippet you proposed and other Velocity statements. 2 choices I think : 1. Remove the script from the pages, put them in other pages and use #includeTopic('Other.Page') 2. Replace getRenderedContent() with getContent() (u'll have text-onlye pages showing up with wiki markup but at least they won't break) Guillaume ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] some problems with SendPageByEmail Application
Hi! Guillaume Lerouge wrote: Guillaume First works fine with other Velocity, but not for pages including the force skin trick as it get redirected to the page holding the snippet. Use #includeInContext('Other.Page') instead. Works fine for getting the page included, but SendPageByMail send corrrectly the page but adding the following error Error number 4001 in 4: Error while parsing velocity page Main.Donde Wrapped Exception: Invocation of method 'sendRedirect' in class com.xpn.xwiki.web.XWikiServletResponse threw exception java.lang.IllegalStateException @ Main.Donde mailbox:///Users/rrodriguez/Library/Thunderbird/Profiles/wm2vak20.default/Mail/mire.environmentalchange.net/InEPEC?number=815918713,11? /xwiki/bin/edit/Main/3%2C11?parent=Main.Donde No success or failure message in the panel even though the message has been sent. That's weird. Did you change anything else than #set($emailcontent = Author : $xwiki.getUserName($doc.getContentAuthor(), false) | Date : $xwiki.formatDate($doc.date, 'MMM dd, HH:mm') | Email comment : $emailcomment $doc.getContent() $emailpagecomments ) ? I've done again this changes and it works fine: success or failure message whatever method, $doc.getContent() or $doc.getRenderedContent() , I use. I don't know where I was wrong. Sorry for the noise. All the best, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] some problems with SendPageByEmail Application
Hi, I am afraid this is mainly addressed to Guillaume :-( I've downloaded the application, imported it, configured a SMTP server and saved the panel as admin. Admin itself can send pages without a glitch -great feature!- but whoever user I try fails but Admin. Admin was the only user just with first name. No last name. I've tried by creating other dummy user without last name and it can send pages without any problem. Please, could you figure out how to pass $sender to the mailSenderPlugin to allow blanks in the string? Am I missing any other point? Here the head of the error logged. Please, let me know if I could be of any help by doing some test here. * 2008-03-31 00:04:38,625 [http://xpescaderias.environmentalchange.net/xwiki/bin/view/Main/Novidades?sendbyemail=1] [http-193.144.34.240-80-3] ERROR mailsender.MailSenderPlugin - Detailed email informationFrom: Ricardo Rodr?guez To: [EMAIL PROTECTED] Cc: null Bcc: null Subject:Page : Novidades Text: h2 class=heading-1-1-1Novidades a href=$xwiki.getURL(Main.BlogRss, view, xpage=rdf) style=img src=$xwiki.getSkinFile(icons/black-rss.png) alt=rss icon//a/h2 #set($nbstart = $request.nbstart) #set($category = ) #set($nbitems = 5) #includeMacros(Blog.Macros) HTML: Author : Ricardo Rodr?guez | Date : Dec 24, 2007 00:18 | Email comment : h2 class=heading-1-1-1Novidades a href=/xwiki/bin/view/Main/BlogRss?xpage=rdf style=img src=/xwiki/skins/albatross/icons/black%2Drss.png alt=rss icon//a/h2 p/ div class=hfeed /div p/ 2008-03-31 00:04:38,626 [http://xpescaderias.environmentalchange.net/xwiki/bin/view/Main/Novidades?sendbyemail=1] [http-193.144.34.240-80-3] ERROR mailsender.MailSenderPlugin - sendHtmlMessage javax.mail.internet.AddressException: Illegal whitespace in address in string ``Ricardo Rodr?guez'' at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:926) at javax.mail.internet.InternetAddress.parse(InternetAddress.java:819) at javax.mail.internet.InternetAddress.parse(InternetAddress.java:555) at javax.mail.internet.InternetAddress.init(InternetAddress.java:91) * Thanks!! Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] some problems with SendPageByEmail Application
Hi Ricardo, I've downloaded the application, imported it, configured a SMTP server and saved the panel as admin. Admin itself can send pages without a glitch -great feature!- but whoever user I try fails but Admin. Admin was the only user just with first name. No last name. I've tried by creating other dummy user without last name and it can send pages without any problem. Please, could you figure out how to pass $sender to the mailSenderPlugin to allow blanks in the string? Am I missing any other point? Thanks for pointing the problem out. Till I come up with a better solution, you can do the following : Replace #set($sender = $xwiki.getUserName($context.user, false)) with #set($sender = $context.user.substring(6)) . It will look less good as you'll get UserName instead of User Name but at least it should work. I guess it's written somewhere in the SMTP spec that email addresses shall not have spaces within them :-) I'll update the XAR on XWiki.org accordingly. Guillaume ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] some problems with SendPageByEmail Application
Thanks Guillaume, Guillaume Lerouge wrote: Thanks for pointing the problem out. Till I come up with a better solution, you can do the following : Replace #set($sender = $xwiki.getUserName($context.user, false)) with #set($sender = $context.user.substring(6)) . It will look less good as you'll get UserName instead of User Name but at least it should work. I guess it's written somewhere in the SMTP spec that email addresses shall not have spaces within them :-) I'll update the XAR on XWiki.org accordingly. Guillaume Done. It now works fine. Could it perhaps be suitable to include the sender email address for registered users and the Admin email for guest? Cheers, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] some problems with SendPageByEmail Application
Re, Done. It now works fine. Could it perhaps be suitable to include the sender email address for registered users and the Admin email for guest? Right now guests are presented with you need to be logged in to use this feature message bcoz I was afraid of spam thru too many people clicking just to see what happens. You can do it though : 1. remove the #if($context.user == 'XWiki.XWikiGuest') check and its related #end 2. replace the $sender line with : #if($context.user == ' XWiki.XWikiGuest') #set($sender = 'guest') #else #set($sender = $context.user.substring(6)) #end Guillaume ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users