note 89667 modified in function.mail by danbrown

From: Date: Mon, 20 Jun 2011 15:11:13 +0000
Subject: note 89667 modified in function.mail by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-180717@lists.php.net to get a copy of this message
On some shared hosts like 1and1.co.uk, when using mail() function with '-f' flag, email may be quietly 'dropped' and not sent at all without any error message returned if '-f' option is used without email address valid on this host. For example, if used as '-ftest@example.com' the email will be dropped on 1and1 provider. But if you have a 'real' mailbox on the server, for example 'black-hole@example.com', and you use '-fblack-hole@example.com' then the email will be sent. At the same time envelope's 'Return-Path' will be set properly to 'black-hole@example.com' instead of 'test@shared.example.com'. --was-- On some shared hosts like 1and1.co.uk, when using mail() function with '-f' flag, email may be quietly 'dropped' and not sent at all without any error message returned if '-f' option is used without email address valid on this host. For example, if used as '-ftest@test.com' the email will be dropped on 1and1 provider. But if you have a 'real' mailbox on the server, for example 'black-hole@mydomain.com', and you use '-fblack-hole@mydomain.com' then the email will be sent. At the same time envelope's 'Return-Path' will be set properly to 'black-hole@mydomain.com' instead of 'test@shared.host.name'. http://php.net/manual/en/function.mail.php

« previous php.notes (#180717) next »