IF, and only IF, you can send mail from a regular mail client (like Outlook Excuse) via the server named in your php.ini file (I'm quite sure that just "Yahoo.com" won't cut it ...) then you could do it this way. The line in your [Windows] php.ini file is telling PHP which SMTP server to use.
If your ISP has an SMTP server (and well they should) it may be that you could use that one as well.
The issue is one of allowability. Usually (and just as an example) an ISP is not going to allow anyone that is not dialed in to their system to use their SMTP server. It used to be, in yahoo's case, that you could send mail via their SMTP servers if you had a yahoo account and address. It may be that they are pickier now, but I don't know, as I have little contact with that site, except when I wanna check my link:
ping -t4 yahoo.com
HTH, 🙂