When I am sending an email from my yahoo, gmail or hotmail account, it is sent.

Now I have written a PHP (I am learning php), which sends an email from my yahoo account. When I run this script, instead of sending email I am getting an error.

Why am I getting such an error. What is the difference between sending email through script and from yahoo account ?

What I mean is, when I send an email from yahoo account, I am sending an email using browser only. At this time mail server is not required. But hen I send an email from mail program mail server is required. Like browser, can not mail program send mails ? A browser can connect with yahoo server and mail program can not ? Why ? what does browser have that can connect with yahoo server ? browser is using HTTP to connect with server. Can not mail program use HTTP ? Is it only browser which can use HTTP ? Does browser use SMTP or not ? Does mail program automatically use SMTP ?

Please provide answer in non technical terms and in some details please.