I want to send mail through PHP without using SMTP server like gmail. It should be send from localhost only.
Is it possible?
I want to send mail through PHP without using SMTP server like gmail. It should be send from localhost only.
Is it possible?
If you want to send mail only to local users on a *nix system, you can use the systems mail
command. It would work like this:
$pp = popen('mail -s "subject" jdoe', 'w');
fwrite($pp, $content);
pclose($pp);
where subject is to be replaced with the actual subject, jdoe with the target user account and $content
should hold the desired content.
Every other way of sending mail involves SMTP. If you do not want to use mail()
or an API, you will have to implement it yourself on sockets basis.