Here's what's in my php.ini file:

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25

Is it possible to simply change localhost to smtp.live.com and change the port (smtp_port) to point to a different port (specifically, 567, as required by Microsoft) in order to send email to a Microsoft Live email address via PHP? I tried the normal mail() route, but I never received the email from the script, and can only assume it has to do with SMTP authentication. I don't have very much experience with PHP.

3

There are 3 best solutions below

0
On BEST ANSWER

No, that won't work. smtp.live.com requires authentication, and the PHP mail() command does not support authentication. As Pascamel suggested, you should use a library that supports sending mail through a remote SMTP server using authentication. phpmailer is very good.

0
On

Have a look at PHPMailer : https://github.com/PHPMailer/PHPMailer

I'm using it to send emails through a GMail account, settings are pretty easy!

This way you won't have to update your php.ini

0
On

in php.ini you can change smtp server to different server ONLY for WINDOWS machines. You can't do it for unix machines. it just ignores even if you set smtp = yourserver.