diff options
author | Adam Spragg <adam@spra.gg> | 2018-08-14 09:58:04 +0100 |
---|---|---|
committer | Adam Spragg <adam@spra.gg> | 2018-08-14 09:58:04 +0100 |
commit | 9398328566690ae2fb5d5102f66a29bc5ec006e3 (patch) | |
tree | 0339b319d0d569951c2552a814b2afcaaa43ebb5 /README.md | |
parent | c77bb443960ffe70d260a22b4bd7331a7bf35581 (diff) |
Add inline code markers where appropriate
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,12 +1,12 @@ mailTemplate - Send an email using a PHP template file. ======================================================= -mailTemplate($\_filename, $\_v) causes the PHP engine to parse the PHP file specified by #\_filename, with the variables -passed in the variable #\_v, which should output an [RFC-822](https://tools.ietf.org/html/rfc822) (and its +`mailTemplate($\_filename, $\_v)` causes the PHP engine to parse the PHP file specified by `$\_filename`, with the +variables passed in the variable `$\_v`, which should output an [RFC-822](https://tools.ietf.org/html/rfc822) (and its [successors](https://en.wikipedia.org/wiki/Email#Message_format)) style message. The function then extracts the headers from the message, grabs the "To" and "Subject" lines from it, and then passes the "To:", "Subject:", message body, and remaining headers, to the PHP -[mail()](https://secure.php.net/manual/en/function.mail.php) function. +`[mail()](https://secure.php.net/manual/en/function.mail.php)` function. As an example, consider template file "thanks.php" @@ -31,8 +31,8 @@ Which could then be called with: 'important' => FALSE, ]}; -Note that, as of this implementation, \_filename is read using -[include](https://secure.php.net/manual/en/function.include.php), so it uses the file-finding rules defined therein. +Note that, as of this implementation, `$\_filename` is read using +`[include()](https://secure.php.net/manual/en/function.include.php)`, so it uses the file-finding rules defined therein. Also, it is worth remembering that PHP eats newlines directly following a PHP close tag. Therefore, if you have: @@ -43,8 +43,8 @@ Then the newline following the close tag will be eaten by the PHP parser, and yo To: example@example.comSubject: ... -To work around this, you need to either make the closing tag not the last thing on the line (e.g. by adding a -trailing space to the line), or forcibly output a newline yourself from within the PHP, e.g.: +To work around this, you need to either make the closing tag not the last thing on the line (e.g. by adding a trailing +space to the line), or forcibly output a newline yourself from within the PHP, e.g.: To: <?= $recipient."\n" ?> Subject: ... |