comparison src/nabble/view/naml/post_by_email.naml @ 0:7ecd1a4ef557

add content
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 Mar 2019 19:15:52 -0600
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:7ecd1a4ef557
1 <macro name="post by email" requires="post_by_email" unindent="true">
2 <n.catch_exception. id="save-block">
3 <n.save_post_by_email />
4 </n.catch_exception.>
5 <n.format_error.handle_exception. for="save-block">
6 <n.exception. name="subscription_processing_bad_user">
7 <n.send_standard_failure_mail.>
8 This email address only works for the registered Nabble user who it is assigned to, and you (<n.email_from/>) are not that user.
9 </n.send_standard_failure_mail.>
10 </n.exception.>
11 <n.exception. name="banned">
12 <n.send_standard_failure_mail.>
13 Your email to <n.email_to/> has been rejected because you are not allowed to post to <n.replied_to_node.url/> . Please contact the owner about permissions or visit the Nabble Support forum.
14 </n.send_standard_failure_mail.>
15 </n.exception.>
16 <n.exception. name="bad_mail">
17 <n.send_standard_failure_mail.>
18 Your email to <n.email_to/> couldn't be parsed.
19 </n.send_standard_failure_mail.>
20 </n.exception.>
21 </n.format_error.handle_exception.>
22 </macro>
23
24 <macro name="save_post_by_email" requires="post_by_email" unindent="true">
25 <n.fix_threading/>
26 <n.if.not.mail_author.can_post_under.replied_to_node>
27 <then.throw_template_exception name="banned" />
28 </n.if.not.mail_author.can_post_under.replied_to_node>
29 <n.save_to_post/>
30 </macro>
31
32 <macro name="fix_threading" requires="post_by_email">
33 <n.thread_by_subject prefixes="[n.prefixes/]" />
34 </macro>
35
36 <macro name="prefixes" requires="post_by_email">
37 re|aw|res|fwd|答复
38 </macro>
39
40 <macro name="send_standard_failure_mail" dot_parameter="text" requires="post_by_email" unindent="true">
41 <n.send_failure_mail.>
42 Delivery to the following recipient failed permanently:
43
44 <n.nop/> <n.email_to/>
45
46 <n.text/>
47 </n.send_failure_mail.>
48 </macro>