Re: Using the Mail function without an SMTP?
| From: | Greg Thomas | Date: | Fri, 24 Feb 2006 17:45:32 +0000 |
| Subject: | Re: Using the Mail function without an SMTP? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-26721@lists.php.net to get a copy of this message | ||
In theory, if you went to the trouble of finding the recipiants mx
record/smtp server, you could use their server to send mail to them, just as
a normal smtp server does. Even though you'd have to find the recip's info
(their smtp server) on your own, almost any smtp class should be able to
handle the actual mail sending.
In short, the way SMTP works, with relay checks, is that the smtp servers
have an open connection. This connection is for both sending mail to other
smtp servers and receiving mail from its users and other smtp servers. As
long as your email passes the relay checks (using a valid recip email), the
remote smtp server should not be able to tell the difference between your
script and any other basic smtp server trying to send mail to its user.
Some servers may add other checks as well, like aol requires a reverse ip
lookup to resolve to a name, but for the most part it should work fine.
I have a working model of this in which I use to test clients smtp servers
for open relay, in which I specify the smtp, etc. You would just have to
figure out the smtp server for each recip on your own before processing the
email.
Of course, this wouldn't be using the actual mail() function, as you'd have
written/borrowed your own.
""Daniel Anderson"" <shadowedmyth@hotmail.com> wrote in message
news:BAY101-DAV278D7A0749A6B085A0855C0FE0@phx.gbl...
> Is there a way I can use the Mail(); function without having to have an
> SMTP server?
>
> PHPBB doesn't use it, I tried browsing the source code to see how they did
> it... but they compressed their PHP files, so it is extremely difficult to
> read.
>
> Does anyone know know how I may do the same please?
>
> Many thanks!
>
> Warmest Regards,
> Dan