Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

Copyright 1997-2017 Horde LLC (http://www.horde.org/) Copyright (c) 2002-2007, Richard Heyes All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Copyright: 1997-2017 Horde LLC (http://www.horde.org/)
Copyright: 2002-2007 Richard Heyes
License: http://www.horde.org/licenses/bsd New BSD License
File Size: 263 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Horde_Mail_Transport:: (6 methods):
  __get()
  prepareHeaders()
  parseRecipients()
  _sanitizeHeaders()
  _normalizeEOL()
  _getFrom()


Class: Horde_Mail_Transport  - X-Ref

Mail transport base class.

__get($name)   X-Ref
No description

prepareHeaders(array $headers)   X-Ref
Take an array of mail headers and return a string containing text
usable in sending a message.

param: array $headers  The array of headers to prepare, in an
return: mixed  Returns false if it encounters a bad address; otherwise

parseRecipients($recipients)   X-Ref
Take a set of recipients and parse them, returning an array of bare
addresses (forward paths) that can be passed to sendmail or an SMTP
server with the 'RCPT TO:' command.

param: mixed $recipients  Either a comma-separated list of recipients
return: array  Forward paths (bare addresses, IDN encoded).

_sanitizeHeaders($headers)   X-Ref
Sanitize an array of mail headers by removing any additional header
strings present in a legitimate header's value.  The goal of this
filter is to prevent mail injection attacks.

Raw headers are sent as-is.

param: array $headers  The associative array of headers to sanitize.
return: array  The sanitized headers.

_normalizeEOL($data)   X-Ref
Normalizes EOLs in string data.

param: string $data  Data.
return: string  Normalized data.

_getFrom($from, $headers)   X-Ref
Get the from address.

param: string $from    From address.
param: array $headers  Headers array.
return: string  Address object.