|

Smtp - Office 365
Posted 06 March 2014 - 01:36 AM #1
Settings
smtp.office365.com
port: 587
Encryption method: TLS
I've tried this method but Gmail is SSL not TLS: http://kb.cs-cart.com/gmail
Test page shows the following:
if I test for SSL on port 465 (like Google) I get this
Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.office365.com:465 (Connection timed out) in /home/luciasim/public_html/smtp.php on line 9
If I test for TLS on port 587 I get this:
Warning: fsockopen() [function.fsockopen]: SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in /home/user/public_html/smtp.php on line 9
Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in /home/user/public_html/smtp.php on line 9
Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.office365.com:587 (Unknown error) in /home/user/public_html/smtp.php on line 9
CS-Cart 4.7.1
Posted 04 April 2014 - 05:12 AM #2
did you managed to get this working? I tried today as well with no avail.
Posted 04 April 2014 - 12:09 PM #4
only TLS is allowed.
Im on support with MS to also find this as it is needed by us ASAP.
Posted 04 April 2014 - 10:19 PM #5
If you get anything to try let me know and I can help beat it up.
CS-Cart 4.7.1
Posted 28 May 2014 - 08:07 PM #7
Is there a workaround? We upgraded our email system to Exchange and didn't realize it would break /usr/sbin/sendmail that had been used in the past.
Any help would be greatly appreciated.
Posted 02 June 2014 - 11:36 PM #8
CS-Cart 4.7.1
Posted 03 June 2014 - 03:05 AM #9
Fortigate Firewalls
Posted 03 June 2014 - 03:13 AM #10
Change your CS-Cart Email Setting.
/home/YOURDOMAIN/CS-CART/app/lib/other/phpmailer/class.smtp.php LINE # 131. // connect to the smtp server $this->smtp_conn = @fsockopen('ssl://' . $host, // the host of the server
Fortigate Firewalls
Posted 04 June 2014 - 02:28 AM #11
Per posting CS-Cart code (that I paid $45 for) not sure how that works around here. I don't wish to be banned! I would hope to see updates from CS-Cart of their existing Google SMTP page (no v4.x methods listed) and adding O365 or other methods. http://kb.cs-cart.com/gmail
CS-Cart 4.7.1
Posted 13 July 2014 - 04:28 AM #12
thanks.
Posted 13 September 2014 - 01:05 PM #13
http://www.cs-cart.c...angelog422.html "PHPMailer: "Use Encrypted Connection" settings were added for SMTP server settings"
Here's my settings:
Method: via SMTP
SMTP Host: smtp.office365.com:587
Use Encrypted: TLS
Use SMTP Auth: checked
CS-Cart 4.7.1
Posted 13 September 2014 - 04:43 PM #14
Whoot!!! 4.2.2 adds TLS encryption option for SMTP and works with O365.
http://www.cs-cart.c...angelog422.html "PHPMailer: "Use Encrypted Connection" settings were added for SMTP server settings"
Here's my settings:
Method: via SMTP
SMTP Host: smtp.office365.com:587
Use Encrypted: TLS
Use SMTP Auth: checked
Yup, works great in my side too

Posted 01 October 2015 - 10:27 PM #15
Hello fellow SMTP'ers - a note that the upgrade from 4.3.3 to 4.3.4 may fail for you. I received the following error that stopped the upgrade (upgrade process tries to send an email that the database has been backed up):
"ErrorMessage could not be sent. Mailer Error: SMTP Error: data not accepted."
The fix is to switch to PHP Mail Function for the upgrade and then back to SMTP when done.
CS-Cart 4.7.1
Posted 14 April 2016 - 07:59 AM #16
Hi,
[SOLVED] ! Details here:
To resolve the issue " Mailer Error: SMTP Error: Data not accepted. ",
Check all connection settings to be set properly:
Host: outlook.office365.com:587
User: user1@example.com
Pass: secretpassword
Use Encrypted Connection: TLS
SMTP Authentification: Checked
Make sure that the user "user1@example.com" set above has the "Send As" permissions set (in Office365 administration panel), for the store administrations email account set in "CS-Cart > Settings > Company" .
For example: user1@example.com should be allowed to send emails from mystoreadmin@example.com in Office365 exchange settings.
Posted 15 April 2016 - 02:21 AM #17
Make sure that the user "user1@example.com" set above has the "Send As" permissions set (in Office365 administration panel), for the store administrations email account set in "CS-Cart > Settings > Company" .
Thanks for this - Will try as we have the Site Administrator email set to something different than the SMTP settings since we don't want the administrator to get the registration, abandoned cart etc emails.... We'll see if it works for the next upgrade. Was not a problem prior to switching to O365 for email....
CS-Cart 4.7.1
Posted 27 May 2016 - 08:38 PM #18
Also having this Office365 SMTP "Error Message could not be sent. Mailer Error: SMTP connect() failed."-issue despite trying all suggested fixes mentioned above. Please note I am running Multi-vendor CS-Cart installation (v4.3.6) on Digital Ocean Ubuntu 14.04 LAMP stack droplet. Here are my settings from /admin.php?dispatch=settings.manage§ion_id=Emails page:
Method: via SMTP server
SMTP host: smtp.office365.com:587
SMTP username: user@myoffice365domain.com
SMTP password: <mypass>
Use Encrypted Connection: TLS
Use SMTP authentication: Checked
I have also tried testing using the mailtest.php file but am still getting errors like:
Warning: fsockopen(): unable to connect to tls://outlook.office365.com:587 (Connection timed out) in /var/www/dev.artisanfishing.com/public_html/mailtest.php on line 9 php
...or (if I switch the protocol from tsl:// back to ssl:)...
Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in/var/www/dev.artisanfishing.com/public_html/mailtest.php on line 9
Warning: fsockopen(): Failed to enable crypto in /var/www/dev.artisanfishing.com/public_html/mailtest.php on line 9
Warning: fsockopen(): unable to connect to ssl://smtp.office365.com:587 (Unknown error) in /var/www/dev.artisanfishing.com/public_html/mailtest.php on line 9
I have also looked into adjusting my class.smtp.php file as mentioned here: http://forum.cs-cart...ndpost&p=184898to no avail. Also note that my class.smtp.php lives in a different place than mentioned in comment #10, mine lives here: /app/lib/vendor/phpmailer/phpmailer/class.smtp.php
Is there something else I'm missing or additional documentation on this issue?
Thank you,
_rs
Posted 30 May 2016 - 11:15 PM #19
We used the setting below and at first it didn't work, but then tried again and it did.
Method: via SMTP server
SMTP host: smtp.office365.com:587
SMTP username: user@myoffice365domain.com
SMTP password: <mypass>
Use Encrypted Connection: TLS
Use SMTP authentication: Checked
However using SMTP I found it takes 18 seconds to come back to the Customer and say "Congratulations! Your order has been successfully placed."
With "via php mail function" it was more like 2 seconds.
Do others have similar results? Is that just the nature of SMTP?
If so it would seem "via php mail function" is the preferred option anyway.
CS-Cart V4.3.6, PHP 7.0.7, Linux VPS managed by www.serverpilot.io
Posted 24 June 2018 - 07:57 AM #20
Using SMTP email with Office 365 is working on my store but it is very slow. CS-Cart needs to wait more than 20 seconds for the email to be sent. However, PHP Mail or Sendmail is very fast.
Do you experience such delay in Office 365 SMTP relay?
Thanks!