How can I send an email via Yahoo!\'s SMTP servers in PHP?
You should use something like Swift Mailer or PHPMailer. The following example is for Swift:
$message = Swift_Message::newInstance()
->setSubject('Your subject')
->setFrom(array('john@doe.com' => 'John Doe'))
->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name'))
->setBody('Here is the message itself')
->addPart('Here is the message itself
', 'text/html')
;
$transport = Swift_SmtpTransport::newInstance('smtp.mail.yahoo.com', 465, 'ssl')
->setUsername('your username')
->setPassword('your password')
;
$mailer = Swift_Mailer::newInstance($transport);
$result = $mailer->send($message);