PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_SMTP » Bug #1288

Feature request: VERP style deliveries

Details

Submitted2004-04-26 18:02 UTC
Fromtuupola at php dot net
Assignedchagenbu
StatusClosed
PackageNet_SMTP
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2004-04-26 18:02 UTC] tuupola at php dot net

Description:
------------
As requested on #pear I post this feature request on here too. The patch below enables optional VERP style deliveries with default delimiters or with delimiters defined by yourself.

The additional parameters to mailFrom() are passed as an array to leave room for possible future implementations of other arguments such as SIZE or SECURITY to MAIL FROM: command.

There is also another feature request for VERP as a patch to Mail_smtp driver.

--- SMTP.php 2004-04-26 20:48:32.260000000 +0300
+++ SMTP.php.new 2004-04-26 20:48:25.690005000 +0300
@@ -659,14 +659,33 @@
*
* @param string The sender (reverse path) to set.
*
+ * @param array optional arguments. Currenly supported:
+ * verp boolean or string. If true or string
+ * verp is enabled. If string the characters
+ * are considered verp separators.
+ *
* @return mixed Returns a PEAR_Error with an error message on any
* kind of failure, or true on success.
* @access public
* @since 1.0
*/
- function mailFrom($sender)
+ function mailFrom($sender, $args=array())
{
- if (PEAR::isError($error = $this->_put('MAIL', "FROM:<$sender>"))) {
+
+ $argstr = '';
+
+ if (isset($args['verp'])) {
+ /* XVERP */
+ if ($args['verp'] === true) {
+ $argstr .=' XVERP';
+
+ /* XVERP=something */
+ } else if (trim($args['verp'])){
+ $argstr .=' XVERP=' . $args['verp'];
+ }
+ }
+
+ if (PEAR::isError($error = $this->_put('MAIL', "FROM:<$sender>$argstr"))) {
return $error;
}
if (PEAR::isError($error = $this->_parseResponse(250))) {