Dez 14
To send simple mails im Java, e.g. without header modifications or attachment you can use apache commons library.
Download it at http://commons.apache.org/ and add the jar to your project.
1
2
3
4
5
6
7
8
9
| SimpleEmail email = new SimpleEmail();
email.setHostName("host.test.com");
email.setFrom("from@test.com", "testfromname");
email.addTo("to@test.com", "testtoname");
email.addBcc("bcc@test.com", "testbccname");
email.setSubject("testsubject");
email.setMsg("testmessage");
email.setAuthentication("username", "pass");
email.send(); |
Check simple email-class documentation for further configuration as smtp-port etc.
Tagged with: apache commons • Java • lib • mail • simplemail
Nov 27
I am glad that I could gain experience in a lot of CMS-Systems, Open Source CMS like Typo3 and Joomla as well as Licence CMS for example InterRed. Now I will come to my favorite Open-Source CMS, Typo3!
What if you like to create a “previous” – “next” navigation with typo3? Have a look at the following code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
| lib.nav-referenzen = COA
lib.nav-referenzen {
10 = HMENU
10 {
entryLevel = 3
special = browse
special {
items = prev
items.prevnextToSection = 1
}
1 = TMENU
1 {
NO {
doNotLinkIt = 1
stdWrap.cObject = COA
stdWrap.cObject {
10 = TEXT
10 {
field = title
typolink {
parameter.field = uid
returnLast = url
}
wrap = <a title="{field:title}" href="|"></a>&nbsp;&nbsp;
insertData = 1
}
}
}
}
}
20 < .10
20 {
special.items = next
1.NO.stdWrap.cObject.10.wrap = &nbsp;&nbsp;<a title="{field:title}" href="|">next &raquo;</a>
}
} |
Now put this code into your template:
with automaketemplate e.g: subparts.bottom < lib.nav-referenzen
with templavoila e.g.: lib.prevnextnavigation < lib.nav-referenzen
subparts.bottom and lib.prevnextnavigation are only sample object names. Replace them with your own subpartname or templavoila lib name.
Tagged with: cms • interred • lib • navigation • navigation typo3 • templavoila • Typo3 • typoscript