Next: Internet address manipulation functions, Previous: SMTP Callout functions, Up: Library [Contents][Index]
The following functions are wrappers over the callout functions described in the previous section. They are provided for backward compatibility.
These functions are defined in the module poll.mfl, which you must require prior to using any of them.
Poll SMTP host ip for email address email,
using domain as EHLO
domain and mailfrom as
MAIL FROM
. Returns 0 or 1 depending on the result of the test.
In contrast to the strictpoll
function, this function does not use
cache database and does not fall back to polling MX servers if the
main poll tempfails. The function can throw one of the following
exceptions: e_failure
, e_temp_failure
.
Poll MXs of the domain for email address email, using
domain as EHLO
domain and mailfrom as MAIL
FROM
address. Returns 0 or 1 depending on the result of the test.
In contrast to the stdpoll
function, _pollmx
does
not use cache database and does not fall back to polling the ip
if the poll fails. The function can throw one of the following
exceptions: e_failure
, e_temp_failure
.
Performs standard poll for email, using domain as
EHLO
domain and mailfrom as MAIL FROM
address.
Returns 0 or 1 depending on the result of the test. Can raise one of
the following exceptions: e_failure
, e_temp_failure
.
In on
statement context, it is synonymous to poll
without explicit host.
Performs strict poll for email on host host.
See the description of stdpoll
for the detailed information.
In on
context, it is synonymous to poll host host
.
The mailfrom argument can be a comma-separated list of email addresses, which can be useful for servers that are unusually picky about sender addresses. It is advised, however, that this list always contain the ‘<>’ address. For example:
_pollhost($client_addr, $f, "domain", "postmaster@my.net,<>")
See also mail-from-address.
Before returning, all described functions set the following built-in variables:
Variable | Contains |
---|---|
last_poll_host | Host name or IP address of the last polled host. |
last_poll_sent | Last SMTP command, sent to this host. If nothing was sent, it contains literal string ‘nothing’. |
last_poll_recv | Last SMTP reply received from this host. In case of multi-line replies, only the first line is stored. If nothing was received the variable contains the string ‘nothing’. |
cache_used | 1 if cached data were used instead of
polling, 0 otherwise. This variable is set by stdpoll
and strictpoll . If it equals 1 , none of the above
variables are modified. See cache_used example, for an example. |
Next: Internet address manipulation functions, Previous: SMTP Callout functions, Up: Library [Contents][Index]