How to implement login through outlook through Curl in php. I am new to this issue.

  • And what is the challenge? If you receive / send mail then Curl is not needed. - Nsk
  • It is only necessary to find out he correctly entered his address and password from the mail. That is, you need to get a response from the server like "Success" - Nurlybai Uzakbayev

1 answer 1

According to the task clarified in the comments, it is likely that CURL is not needed, IMAP is enough (unless of course it is in outlook) is enabled by default. The implementation is something like this:

$hostname = '{outlook.office365.com:993/imap/ssl/novalidate-cert}INBOX'; $username = 'username'; $password = 'password'; /* try to connect */ $inbox = imap_open($hostname,$username,$password) or die('Cannot connect to '.$hostname.': ' . imap_last_error());