i have code like this in laravel to send email
public static function send_email(){
Mail::send('emails.g', array(), function($message){
$message->from('leo_messi@barcelona.com', 'lol');
$message->to('neymar@barcelona.com')->subject('LOL LOL');
});
}
my email config file is like this
return array(
'driver' => 'smtp',
'host' => '{host ip here}',
'port' => 25,
'from' => array('address' => null, 'name' => null),
// 'encryption' => 'ssl',
'username' => "leo_messi@barcelona.com",
'password' => "lollol",
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,
);
i can send mail from my gmail account using above code. but i want to send email from local exchange server (NTLM authentication). above code is not working for exchange server. whats wrong with me?
You need to use imap or pop3, I have only ever managed to do it with pop3 and imap. But you can configure MS exchange to allow these protocols with a username and password.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.