• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Office 365 SMTP Email config

#1
CodeIgniter 2.0 (not an option to move up to 3.0 yet), LAMP Server running on Windows Machine (Apache 2.2).

Just migrated to Office 365.

Everything running smoothly except a form that emails out.... I'm receiving the following error message:


Code:
220 BY2PR16CA0040.outlook.office365.com Microsoft ESMTP MAIL Service ready at Fri, 22 Apr 2016 17:53:52 +0000

hello: 250-BY2PR16CA0040.outlook.office365.com Hello [265.136.157.12]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250 CHUNKING

Failed to send AUTH LOGIN command. Error: 504 5.7.4 Unrecognized authentication type
from: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM
The following SMTP error was encountered: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM

to:
The following SMTP error was encountered:

data:
The following SMTP error was encountered:

The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

User-Agent: CodeIgniter
Date: Fri, 22 Apr 2016 19:53:53 +0200
From: 
Return-Path: 
To: [email protected]
Subject: =?utf-8?Q?Testing?=
Reply-To: "[email protected]
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Testing


Configuration of email config file


Code:
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'smtp.office365.com';
$config['smtp_user'] = '*******';
$config['smtp_pass'] = '*******';
$config['smtp_port'] = '587';
$config['smtp_crypto'] = 'tls';
$config['smtp_timeout'] = '5';
$config['charset']='utf-8'; // Default should be utf-8 (this should be a text field)
$config['newline']="\r\n"; //"\r\n" or "\n" or "\r". DEFAULT should be "\r\n"


Any ideas why this error pops up?
Reply

#2
Try: Add $config['crlf'] = "\r\n";
Reply

#3
(04-22-2016, 12:45 PM)Paradinight Wrote: Try: Add $config['crlf'] = "\r\n";

No change... same error.
Reply

#4
I'm having the same problem and wondered if anyone had found a fix ?

It seems to be that AUTH is not advertised in the EHLO from O365
Reply

#5
Sounds like it is not seeing the mail servers ip, check your mail server log files.
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply

#6
Change the line

$config['smtp_timeout'] = '5';

to

$config['smtp_timeout'] = '60';

This error happens because 5 seconds is not sufficent time to authenticate your login and password. If 5 seconds has passed and it not validate your login and password, you will receive this error.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.