DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:mail

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
devel:mail [2022-07-02 20:07] – fix setBody issue Klap-indevel:mail [2023-09-16 00:49] Klap-in
Line 23: Line 23:
 ===== Using Replacements ===== ===== Using Replacements =====
  
-The ''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, so you only need to specify those that differ from plain text.+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, so you only need to specify those that differ from plain text.
  
  
Line 31: Line 31:
  
 // the plain text placeholder input // the plain text placeholder input
-$trep = array(+$trep = [
     'NAME' => 'Some Guy',     'NAME' => 'Some Guy',
-    'WEB'  => 'http://www.dokuwiki.org' +    'WEB'  => 'https://www.dokuwiki.org' 
-);+];
  
 // the HTML placeholder input that differ from the text ones // the HTML placeholder input that differ from the text ones
-$hrep = array( +$hrep = [ 
-    'WEB'  => '<a href="http://www.dokuwiki.org">DokuWiki</a>' +    'WEB'  => '<a href="https://www.dokuwiki.org/">DokuWiki</a>' 
-);+];
  
 // standard mail sending as seen above // standard mail sending as seen above
Line 53: Line 53:
 ===== Checking for valid E-Mail ===== ===== Checking for valid E-Mail =====
  
-Use the simple utility function [[xref>mail_isvalid]] to check if a given address is a valid email address. The function makes use of the [[http://code.google.com/p/php-email-address-validation/|php-email-address-validation]] library.+Use the simple utility function [[xref>mail_isvalid()]] to check if a given address is a valid email address. The function makes use of the [[http://code.google.com/p/php-email-address-validation/|php-email-address-validation]] library.
  
  
devel/mail.txt · Last modified: 2024-02-29 14:06 by 190.153.116.145

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki