Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.7. Setup for powermail

Note: The most settings are possible with constants editor

# POWERMAIL PLUGIN #
plugin.tx_powermail_pi1 {
# --- CONSTANTS ---
template.fieldWrap = {$plugin.powermail.template.fieldWrap}
template.formWrap = {$plugin.powermail.template.formWrap}
template.thxMessage = {$plugin.powermail.template.thxMessage}
template.emails = {$plugin.powermail.template.emails}
template.confirmation = {$plugin.powermail.template.confirmation}
template.all = {$plugin.powermail.template.all}
template.mandatory = {$plugin.powermail.template.mandatory}
template.MultipleJS = {$plugin.powermail.template.MultipleJS}
css.MultipleJS = {$plugin.powermail.css.MultipleJS}
emailformat.recipient_mail = {$plugin.powermail.emailformat.recipient_mail}
emailformat.sender_mail = {$plugin.powermail.emailformat.sender_mail}
# ---
enable.unique = {$plugin.powermail.enable.unique}
email.noreply = {$plugin.powermail.email.noreply}
email.checkMX = {$plugin.powermail.email.checkMX}
hiddenfields.show = {$plugin.powermail.hiddenfields.show}
markerALL.hideLabel = {$plugin.powermail.markerALL.hideLabel}
markerALL.notIn = {$plugin.powermail.markerALL.notIn}
PID.dblog = {$plugin.powermail.PID.dblog}
form.method = {$plugin.powermail.form.method}
format.datetime = {$plugin.powermail.format.datetime}
format.date = {$plugin.powermail.format.date}
label.allowTags = {$plugin.powermail.label.allowTags}
html.removeXSS = {$plugin.powermail.html.removeXSS}
countryselect.charset = {$plugin.powermail.countryselect.charset}
description.wrap = {$plugin.powermail.description.wrap}
mandatory.messages = {$plugin.powermail.mandatory.messages}
mandatory.symbol = {$plugin.powermail.mandatory.symbol}
mandatory.wrap = {$plugin.powermail.mandatory.wrap}
captcha.use = {$plugin.powermail.captcha.use}
pagebrowser.wrap = {$plugin.powermail.pagebrowser.wrap}
upload.folder = {$plugin.powermail.upload.folder}
upload.file_extensions = {$plugin.powermail.upload.file_extensions}
upload.mimecheck = {$plugin.powermail.upload.mimecheck}
upload.filesize = {$plugin.powermail.upload.filesize}
upload.attachment = {$plugin.powermail.upload.attachment}
clear.session = {$plugin.powermail.clear.session}
js.mandatorydivclass = {$plugin.powermail.js.mandatorydivclass}
js.onfocus = {$plugin.powermail.js.onfocus}
field.checkboxJS = {$plugin.powermail.field.checkboxJS}
field.checkboxSplitSign.noTrimWrap = |, ||
rte.parse = {$plugin.powermail.rte.parse}
label.parse = {$plugin.powermail.label.parse}
input.style = {$plugin.powermail.input.style}
powermail.charset = {$plugin.powermail.powermail.charset}
barrier-free.tabindex = {$plugin.powermail.barrier-free.tabindex}
barrier-free.accesskey = {$plugin.powermail.barrier-free.accesskey}
geoip.file = {$plugin.powermail.geoip.file}
geoip.addValuesToMarkerALL = {$plugin.powermail.geoip.addValuesToMarkerALL}
debug.output = {$plugin.powermail.debug.output}
# Some settings for Emails
email {
# Settings for mail to the default receiver(s)
recipient_mail {
# Sender name (overwrite)
sender.name = TEXT
sender.name.value =
# Sender email (overwrite)
sender.email = TEXT
sender.email.value =
# Reply name
reply.name = TEXT
reply.name.value = 
# Reply email
reply.email = TEXT
reply.email.value = 
# Return path (if not set, sender will be used)
returnpath = TEXT
returnpath.value = 
# stdWrap for uploaded attachments
attachment = TEXT
attachment.field = file
# Add some attachments to the email (wrap every attachment with , if you want to add more than only one)
addAttachment = COA
addAttachment {
10 = TEXT
#10.value = fileadmin/pic.jpg
#10.wrap = |,
}
# Sender email (SQL Query - only if field receiver is empty in BE)
# Markers should contain only integer or integer lists (e.g. 1,2,3)
#email_query = TEXT
#email_query.value = SELECT email FROM fe_users WHERE uid = ###UID123### AND disable = 0 AND deleted = 0 
#email_query.value = SELECT email FROM fe_users WHERE find_in_set(###UID123###, usergroup) > 0 AND disable = 0 AND deleted = 0
#email_query.value = SELECT email FROM tt_address WHERE uid = ###UID123### AND hidden = 0 AND deleted = 0 
}
# Settings for (confirmation) mail to the user
sender_mail {
# Sender name (overwrite)
sender.name = TEXT
sender.name.value =
# Sender email (overwrite)
sender.email = TEXT
sender.email.value =
# Reply name
reply.name = TEXT
reply.name.value = 
# Reply email
reply.email = TEXT
reply.email.value = 
# Return path (if not set, main receiver will be used)
returnpath = TEXT
returnpath.value = 
# Add some attachments to the email (split every attachment with , if you want to add more than only one)
addAttachment = COA
addAttachment {
10 = TEXT
#10.value = fileadmin/pic.jpg
#10.wrap = |,
}
}
}
# Enable, Disable email to sender or receiver or db saving
allow {
# Enable or disable email to receiver (main mail)
email2receiver = TEXT
email2receiver.value = {$plugin.powermail.allow.email2receiver}
# Enable or disable email to sender
email2sender = TEXT
email2sender.value = {$plugin.powermail.allow.email2sender}
# Enable or disable saving values to database
dblog = TEXT
dblog.value = {$plugin.powermail.allow.dblog}
}
# --- EXAMPLE CODE SECTION ---
# Manipulation of values in every mode (email to receiver, db log, etc..)
mode {
# Manipulation of values in dblog
dblog {
#uid999 = TEXT
#uid999.field = uid999
#uid999.wrap = <b>|</b>
#uid998_0 = TEXT
#uid998_0.field = uid998_0
#uid998_0.wrap = <b>|</b>
}
# Manipulation of values for email to receiver (main mail)
recipient_mail {
#uid999 = TEXT
#uid999.field = uid999
#uid999.wrap = <b>|</b>
}
# Manipulation of values for email to sender (confirmation mail)
sender_mail {
#uid999 = TEXT
#uid999.field = uid999
#uid999.wrap = <b>|</b>
}
# Manipulation of values for email to sender (confirmation mail)
thx {
#uid999 = TEXT
#uid999.field = uid999
#uid999.wrap = <b>|</b>
}
# Manipulation of values for email to sender (confirmation mail)
confirmation {
#uid999 = TEXT
#uid999.field = uid999
#uid999.wrap = <b>|</b>
}
# Manipulation of values for email to sender (confirmation mail)
mandatory {
#uid999 = TEXT
#uid999.field = uid999
#uid999.wrap = <b>|</b>
}
}
# prefilling form fields (example)
prefill {
# fill field uid997 with a static text
#uid997 = TEXT
#uid997.value = example value
# fill field uid998 with current timestamp
#uid998 = TEXT
#uid998.data = date:U
# fill field uid998 with current date like "Date: 20.01.2009"
#uid996 = TEXT
#uid996.data = date:U
#uid996.strftime = Date: %d.%m.%Y
# fill field uid995 with IP address of the user
#uid995 = TEXT
#uid995.data = getIndpEnv:REMOTE_ADDR
}
# adding (or changing) flexible locallang markers in any HTML template or RTE field (example)
_LOCAL_LANG.en {
locallangmarker_yourvalue = this is a new text
}
# adding flexible typoscript markers in any HTML template or RTE field (example)
dynamicTyposcript {
yourmarker = TEXT
yourmarker.value = This is a new text
}
# extern db entry (example for tt_adress)
dbEntry {
# enable or disable db entry for tt_address
#tt_address._enable = TEXT
#tt_address._enable.value = 1
# write only if field email is not yet filled with current value
# (update - update values of existing entry) 
# (none - no entry if field is filled)
# (disable – always add values – don't care about existing values)
#tt_address._ifUnique.email = update
# add mm relation to uid 2 of tt_address_group (via mm table)
#tt_address._mm = COA
#tt_address._mm.10 = COA
# 1 is always the mm table
#tt_address._mm.10.1 = TEXT
#tt_address._mm.10.1.value = tt_address_group_mm
# 2 is always the other table
#tt_address._mm.10.2 = TEXT
#tt_address._mm.10.2.value = tt_address_group
# 3 is always the uid of the other table to get a relation to this (in this case uid2 of tt_address_group)
#tt_address._mm.10.3 = TEXT
#tt_address._mm.10.3.value = 2
# table "tt_address" with field "email" is a static value => alexander.kellner@einpraegsam.net
#tt_address.email = TEXT
#tt_address.email.value = alexander.kellner@einpraegsam.net
# table "tt_address" with field "pid" is the current pid (e.g. 12)
#tt_address.pid = TEXT
#tt_address.pid.field = uid
# table "tt_address" with field "tstamp" is the current time as timestamp (like 123456789)
#tt_address.tstamp = TEXT
#tt_address.tstamp.data = date:U
# table "tt_address" with field "address" is the current formatted time (like "Date: 20.01.2009")
#tt_address.address = TEXT
#tt_address.address.data = date:U
#tt_address.address.strftime = Date: %d.%m.%Y
# table "tt_address" with field "name" is the value from powermail (tt_content uid 88) field uid18 (###uid18###)
#tt_address.name = TEXT
#tt_address.name.data = TSFE:fe_user|sesData|powermail_88|uid18
# table "tt_address" with field "last_name" is the value from powermail (tt_content uid 88) field uid18 (###uid18###)
#tt_address.last_name = TEXT
#tt_address.last_name.data = TSFE:fe_user|sesData|powermail_88|uid18
# table "tt_address" with field "company" is the value from powermail (tt_content uid 88) field uid21_1 (###uid21_1###) (e.g. a checkbox value)
#tt_address.company = TEXT
#tt_address.company.data = TSFE:fe_user|sesData|powermail_88|uid21|1
}
### Redirection after submit ###
# Return a Number: Typolink to the pid
# Return a URL: Link to an intern or extern URL
# Return a File: Link to a file (within fileadmin folder)
#redirect = COA
#redirect {
#10 = TEXT
#10.value = x
#10.typolink.parameter = 100
#10.typolink.returnLast = url
#}
}
# ---------------------- Additional Typoscript ---------------------
# Add Javascript files to page header if a powermail plugin is on current page
lib.powermail_dynJavascript = TEXT
lib.powermail_dynJavascript {
    wrap = <script src="|" type="text/javascript"></script>
typolink.parameter.dataWrap = {TSFE:id},3131
    typolink.returnLast = url
}
# userFunc to check if powermail is on current page
# powermail is on current page and prototype should be used
[userFunc = user_powermailOnCurrentPage] && [globalVar = LIT:prototype = {$plugin.powermail.libraryToUse}]
page.includeJS.file31312 = EXT:powermail/js/mandatoryjs/lib/prototype.js
page.includeJS.file31313 = EXT:powermail/js/mandatoryjs/src/effects.js
page.includeJS.file31314 = EXT:powermail/js/mandatoryjs/fabtabulous.js
[end]
# powermail is on current page and mootools should be used
[userFunc = user_powermailOnCurrentPage] && [globalVar = LIT:mootools = {$plugin.powermail.libraryToUse}]
page.includeJS.file31312 = EXT:powermail/js/mootools/mootools-1.2.1-packed.js
[end]
# powermail is on current page
[userFunc = user_powermailOnCurrentPage]
page.includeJS.file31311 = EXT:powermail/js/checkbox/checkbox.js
page.headerData.31310 < lib.powermail_dynJavascript
seite.headerData.31310 < page.headerData.31310
seite.includeJS.31311 < page.includeJS.file31311
seite.includeJS.31312 < page.includeJS.file31312
seite.includeJS.31313 < page.includeJS.file31313
seite.includeJS.31314 < page.includeJS.file31314
[end]
# TypeNum 3131 for field validation via prototype (current page with &type=3131 with Javascript)
powermailJS = PAGE
powermailJS {
typeNum = 3131
config {
disableAllHeaderCode = 1
disablePrefixComment = 1
xhtml_cleaning = 0
admPanel = 0
}
10 = TEMPLATE
10 {
template = FILE
template.file = EXT:powermail/js/mandatoryjs/validation.js
subparts.REQUIRED = TEXT
subparts.REQUIRED.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_required
subparts.VALIDATE_REQUIRED = TEXT
subparts.VALIDATE_REQUIRED.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_validate_number
subparts.VALIDATE_DIGITS = TEXT
subparts.VALIDATE_DIGITS.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_validate_digits
subparts.VALIDATE_ALPHA = TEXT
subparts.VALIDATE_ALPHA.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_validate_alpha
subparts.VALIDATE_ALPHANUM = TEXT
subparts.VALIDATE_ALPHANUM.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_validate_alphanum
subparts.VALIDATE_DATE = TEXT
subparts.VALIDATE_DATE.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_validate_date
subparts.VALIDATE_EMAIL = TEXT
subparts.VALIDATE_EMAIL.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_validate_email
subparts.VALIDATE_URL = TEXT
subparts.VALIDATE_URL.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_validate_url
subparts.VALIDATE_DATE_AU = TEXT
subparts.VALIDATE_DATE_AU.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_validate_date_au
subparts.VALIDATE_CURRENCY_DOLLAR = TEXT
subparts.VALIDATE_CURRENCY_DOLLAR.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_validate_currency_dollar
subparts.VALIDATE_SELECTION = TEXT
subparts.VALIDATE_SELECTION.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_validate_selection
subparts.VALIDATE_ONE_REQUIRED = TEXT
subparts.VALIDATE_ONE_REQUIRED.data = LLL:EXT:powermail/pi1/locallang.xml:JSvalidation_label_validate_one_required
subparts.DIV_CLASS = TEXT
subparts.DIV_CLASS.value = {$plugin.powermail.js.mandatorydivclass}
}
}
[globalVar = LIT:mootools = {$plugin.powermail.libraryToUse}]
powermailJS.10.template.file = EXT:powermail/js/mootools/tx_powermail-packed.js
[global]