Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2012
    Posts
    99
    Plugin Contributions
    0

    Default Sending emails with SMTP server on Office365

    Hi guys, I need serious help here.

    Few month ago I installed Zencart for an organization and it works pretty well. But they now just decided to go with an Office365 solution for their email. They configured the email address the store use and the address itself works since I can use it on my cell phone, on my computers, etc, to send and receive emails. But not with ZenCart. It just can't send the emails.

    The IT guy said it's because PHP can't hold the TLS protocol so the store will never be able to use the Office365 SMTP server. To prove what he said he showed me this link:
    https://bugs.php.net/bug.php?id=55236

    But I found this that explain that zencart can use TLS:
    http://www.zen-cart.com/wiki/index.p...Email_Problems

    And DrBytes posted how you can enable TLS in this discussion:
    http://www.zen-cart.com/showthread.p...p-for-SMTP-TLS

    So I did it as DrBytes said, but I still get an error message when I try to send an email from the store:
    "ERROR: Failed sending email to: "xxxxxxx" with subject: "xxxxxxxxx" SMTP Error: Could not connect to SMTP host."

    I get this error whatever configuration I try (SMTP ou SMTPAUTH) or whatever port I try.

    So for now I use the SMTP server from GoDaddy (I know, I don't like them either. Not my decision.). So the store can send emails but not to people who has an Outlook, Hotmail or Live email adress... They don't even receive their mail in their spams, they just don't receive it at all.

    I'm now completely lost! I need to have the store to work with the Office365 SMTP server and need your help on this.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Sending emails with SMTP server on Office365

    What Zen Cart version?
    What detailed messages do you get when you turn on the debug mode inside the functions_email.php file?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jul 2012
    Posts
    99
    Plugin Contributions
    0

    Default Re: Sending emails with SMTP server on Office365

    Sorry for that. Version used is 1.5.1

    With Debug mode to "1" (show SMTP status errors) I get:
    SMTP -> ERROR: Failed to connect to server smtp.office################ 587: Connection timed out (110)

    With Debug mode to "2" (show SMTP server responses) I get:
    SMTP -> ERROR: Failed to connect to server smtp.office################ 587: Connection refused (111)

    With Debug mode to "4" (show SMTP readlines if applicable) I get:
    SMTP -> ERROR: Failed to connect to server smtp.office################ 587: Connection timed out (110)

    With Debug mode to "5" (maximum information) I still get:
    SMTP -> ERROR: Failed to connect to server smtp.office################ 587: Connection timed out (110)

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Sending emails with SMTP server on Office365

    That looks like your server's firewall is blocking outbound traffic on TCP port 587
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jul 2012
    Posts
    99
    Plugin Contributions
    0

    Default Re: Sending emails with SMTP server on Office365

    Thanks DrByte. But it seems that it is a lot more complicated than that, and much more than what I first thought. Many things happens these last days, that's why I was waiting before giving an update on this. But I found some answers and I'll definitively need help. I'll try to make it clear as much as I can.

    First, the problem first describe was relatively easy to fix. I had to use the GoDaddy SMTP server in SMTP without any user or password. Not the Office365 server.

    I burned more than 2 hours yesterday in a conference call with tech support of the Office365 Email division and GoDaddy tech support, where the website is hosted. Many test was made and that's what both Tech said as their conclusion since all the settings on both sides was apparently right.
    So it's working... BUT, not always. That's the problem. And that's where it get me lost!

    DrByte, do you remember last year, you helped me (and few other) with a modification. This mod makes the store to send an email to a third party at a specific address depending on an attribute. Here's the link to the discussion: http://www.zen-cart.com/showthread.p...to-third-party. It seems to work well.

    Just to refresh your memory...:
    The store is for a Federation who regroups 4x4 clubs. Customers needs to be members of a federated club to buy their member card and be able to download a zip file with GPS data of the 4x4 trails of the province. A confirmation from the representative of the club is needed for all customers. So, when the customer buy a member card they have to chose the 4x4 club they are member off in a drop down list, which is an attribute for the product. Then he process to the payment. An email is send to a specific address associated to each case (club, as attribute). That's how it needs to work. And it was not so bad since the last change of mail server points me to some issues that was there from the begining:

    I created an email template that is suppose to be send to the representatives. To some addresses it works. To some others it just send a copy on the order confirmation, not the template I created. How is that possible??

    But that's not the worst issue. If you're a representative and your email is @ hotmail.com, or @ live.com, or @ outlook.com you will never receive the emails. Not even in your spams. Just nothing. And that bug is relatives to that code.

    And what I think is even worst than that... Is that if you're a customer and buy a card, and your address is @ hotmail.com, or @ live.com, or @ outlook.com, you'll not receive your order confirmation either. I need to test this a little more but that's what it seems.

    What is strange and makes me perplex is that the store is configured to send a copy of the Order Confirmation to the treasurer, which have an @ live.com address. And he receive it. But currently, the treasurer is also a representative for one of the federated club so that same email address is in the code to get the confirmation request. And he never get it. Not even in his spams. So I suspect that the code misses a Microsoft security or something like that...

    I tried to figure it all night and I'm completely lost. So I'll go to bed and hope Someone will be able to point me to a possible solution, or maybe just on the good track to find it.
    Last edited by AlexThibo; 4 Apr 2014 at 11:33 AM.

  6. #6
    Join Date
    Jul 2012
    Posts
    99
    Plugin Contributions
    0

    Default Re: Sending emails with SMTP server on Office365

    Just to update this issue...

    We made many test. Maybe like a hundred to see a pattern, because sometimes the emails get in the live, hotmail or outlook account. Like 1 time on 10.
    It's not fixed but we think we understand the problem.

    Website is hosted at GoDaddy.
    Domain and DNS are managed at GoDaddy too.
    We use Office365 to manage the administrative email accounts since GoDaddy charge too much for all the emails adress we need. And Office365 gives us licences for office suite and the use of OneDrive.
    GoDaddy and Microsoft has a agreement together. When you setup the 365 account while having your DNS managed at GoDaddy, Microsoft makes some modification to the DNS records. But these modification do not consider the particularity of our situation. We suspect that the SPF entry was wrong so we made some correction to them and are now waiting for the DNS to update. We'll see.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Sending emails with SMTP server on Office365

    Hopefully they can sort out the issues that are stopping the delivery of the emails Zen Cart is sending.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Problem sending emails and setting up the mail server
    By vvomble in forum Installing on a Windows Server
    Replies: 8
    Last Post: 18 Feb 2013, 10:29 PM
  2. Replies: 1
    Last Post: 16 Mar 2012, 07:47 AM
  3. Replies: 7
    Last Post: 6 Jan 2012, 03:02 AM
  4. Sending emails using SMTPAUTH problem... on my own IIS server
    By Alex Clarke in forum General Questions
    Replies: 3
    Last Post: 25 Mar 2009, 10:19 AM
  5. Emails not sending anymore following physical server move
    By donplay in forum General Questions
    Replies: 5
    Last Post: 31 Oct 2007, 04:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR