devel:mail
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
devel:mail [2018-03-03 01:08] – [setBody() parameters changed?] Dralli72 | devel:mail [2024-02-29 14:06] (current) – Minor change 190.153.116.145 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Handling E-Mails in DokuWiki ====== | ====== Handling E-Mails in DokuWiki ====== | ||
- | DokuWiki contains a wrapper class around PHP's [[phpfn> | + | DokuWiki contains a wrapper class around PHP's [[phpfn> |
Please refer to the [[xref> | Please refer to the [[xref> | ||
Line 23: | Line 23: | ||
===== Using Replacements ===== | ===== Using Replacements ===== | ||
- | The '' | + | The [[xref>setBody()]] function accepts key-value pairs as 3rd and 4th parameter to handle placeholder replacements. Supplying HTML replacements is optional. The HTML replacements will be merged with the text replacements, |
Line 31: | Line 31: | ||
// the plain text placeholder input | // the plain text placeholder input | ||
- | $trep = array( | + | $trep = [ |
' | ' | ||
- | ' | + | ' |
- | ); | + | ]; |
// the HTML placeholder input that differ from the text ones | // the HTML placeholder input that differ from the text ones | ||
- | $hrep = array( | + | $hrep = [ |
- | ' | + | ' |
- | ); | + | ]; |
// standard mail sending as seen above | // standard mail sending as seen above | ||
Line 45: | Line 45: | ||
$mail-> | $mail-> | ||
$mail-> | $mail-> | ||
- | $mail-> | + | $mail-> |
$mail-> | $mail-> | ||
</ | </ | ||
- | ==== setBody() parameters changed? ==== | ||
- | |||
- | According to [[xref> | ||
- | |||
- | <code php> | ||
- | function setBody($text, | ||
- | </ | ||
- | |||
- | So, in the above example the call of setBody should be | ||
- | |||
- | <code php> | ||
- | $mail-> | ||
- | </ | ||
- | --- [[user> | ||
===== Checking for valid E-Mail ===== | ===== Checking for valid E-Mail ===== | ||
- | Use the simple utility function [[xref> | + | Use the simple utility function [[xref> |
devel/mail.txt · Last modified: 2024-02-29 14:06 by 190.153.116.145