ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SMTP not working - No errors in debugging?

February 18, 2010 10:03pm

Subscribe [5]
  • #1 / Feb 18, 2010 10:03pm

    horizonvp

    107 posts

    Error
    Unable to send email at this time.
    Debugging Message
    
    hello: 
    
    Failed to Send Command. Error:
    
    from: 
    
    Failed to Send Command. Error:
    
    to: 
    
    Failed to Send Command. Error:
    
    data: 
    
    Failed to Send Command. Error:
    
    Failed to send SMTP email. Error:
    Unable to send email using SMTP


    Sending the email is obviously failing but nothing is getting returned with the debugging.  Any advice would be helpful.

  • #2 / Feb 19, 2010 1:31am

    John Henry Donovan

    12339 posts

    horizonvp,

    1. What version and build of EE are you using?

    2. Are you using any extensions?

    3. Is this a local install or a professional hosted environment?

    4. Double check your SMTP settings with your host

    5. Is this the Communicate page or somewhere else?

    6. Can you try and switching the protocol to PHP mail?

  • #3 / Mar 17, 2010 3:08pm

    horizonvp

    107 posts

    Figured out the issue that was causing the lack of any response.  Now I need help with the error message we are getting.  I’ve attached a screenshot and provided more details below.

    1. 1.6.8

    2. Playa, Checkboxes, Fieldframe, Gypsy

    3. Professional

    4. Double checked

    5. Communicate

    6. Works with PHP mail but need to setup a mail relay

  • #4 / Mar 17, 2010 5:30pm

    Ingmar

    29245 posts

    It looks like your SMTP server simply times out? Have you asked your host / postmaster about it?

  • #5 / Mar 17, 2010 6:11pm

    horizonvp

    107 posts

    From the server admin:

    The session time out is set to 30 sec.  I can increase that but it should not take 30 seconds to send email.  This is a standard set by Symantec and I route millions of emails a day with that 30 sec time out. 

    I did a test and set the time out to 2 minutes and got the same error.

  • #6 / Mar 17, 2010 6:41pm

    Ingmar

    29245 posts

    Is that a Windows server?

  • #7 / Mar 17, 2010 6:57pm

    horizonvp

    107 posts

    Nope, it’s a linux SMTP engine

  • #8 / Mar 17, 2010 8:15pm

    Brandon Jones

    5500 posts

    horizonvp,

    What was causing the lack of any response?  That might give us a clue.

    If I try to telnet to that server on port 25 I get

    554 You are not allowed to connect.

    Could be an incorrect configuration or security setup on that server?

  • #9 / Mar 18, 2010 2:07pm

    horizonvp

    107 posts

    Not likely at all.  When I telnet to the system I get a 220 ********  that mean you have access.  I also have received bounce back emails.

    Make sure you are using the correct IP 24.171.165.131 or you can use listserv.ncsurveyors.com

  • #10 / Mar 18, 2010 3:55pm

    horizonvp

    107 posts

    Also, we’ve been able to successfully relay from another external connection.

  • #11 / Mar 18, 2010 4:29pm

    horizonvp

    107 posts

    Ok, so when we changed the timeout window to a couple of minutes we ended up getting this error:

    MySQL ERROR:

    Error Number: 2006

    Description: MySQL server has gone away

    Query: SELECT * FROM exp_ff_fieldtypes WHERE enabled = “y”

    This thread seems to suggest the same kind of issue:
    http://ellislab.com/forums/viewthread/108927/

  • #12 / Mar 18, 2010 6:35pm

    Ingmar

    29245 posts

    Can you try to add

    $conf['email_crlf'] = "\r\n";
    $conf['email_newline'] = "\r\n";

    to your config.php, see if that makes a difference? That said, it’s beginning to look like some sort of configuration issue with the SMTP server, do you have access to it’s logs?

  • #13 / Mar 19, 2010 10:19am

    horizonvp

    107 posts

    Below is what my server admin sent me about the issue. 

    I tried adding the lines of code you suggested to the config.php file and it seems to have worked.  I’ll do some more testing and confirm.

    Thanks

    The reason that the mail server is not able to handle the emails sent via smtp on Expression Engine is because the message is not RFC compliant. 

    Below is a typical RFC compliant email conversation:

    220 mail.example.com ESMTP Ready on Mon, 21 Mar 2005 16:29:31 -0800 [a.mail]
    HELO mail.somewhere.com
    250 a.mail.somewhere.com Hello 98.76.54.32.somewhere.com [98.76.54.32], pleased to meet you
    MAIL FROM:<[email protected]>
    250 2.1.0 <[email protected]>... Sender ok
    RCPT TO:<[email protected]>
    250 2.1.5 <[email protected]>... Recipient ok
    DATA
    354 Enter mail, end with “.” on a line by itself
    Hello there!
    OK, bye!
    .
    250 2.0.0 0987654321 Message accepted for delivery
    QUIT
    221 2.0.0 a.mail.example.com closing connection
    Connection closed by foreign host.

    ————————————————————————————————————

    This is a example of a Expression Engine Conversion:

    220 listserv.somedomain.com ESMTP
    EHLO http://www.somedomain.com
    MAIL FROM:<[email protected]>
    RCPT TO:<[email protected]>
    DATA
    User-Agent: ExpressionEngine 1.6.8
    Date: Thu, 18 Mar 2010 19:39:56 -0400
    From: “test” <[email protected]>
    Return-Path: <[email protected]>
    To: .(JavaScript must be enabled to view this email address)
    Subject: =?utf-8?Q?test?=
    Reply-To: “[email protected]” <[email protected]>
    X-Sender: .(JavaScript must be enabled to view this email address)
    X-Mailer: ExpressionEngine 1.6.8
    X-Priority: 3 (Normal)
    Message-ID: <[email protected]>
    Mime-Version: 1.0
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 8bit

    test

    .
    550 esmtp: protocol deviation
    ————————————————————————————————————

    You’ll will notice that once Expression Engine responds with a EHELO it does not wait for a response from the mail server.  Expression Engine just starts sending data.  The receiving mail server see’s this as a protocol deviation and drops the message.

    This can also occur when there are whitespaces in the SMTP commands.

    Here is the RFC compliance url http://tools.ietf.org/html/rfc5321

    Thanks

  • #14 / Mar 19, 2010 12:19pm

    Ingmar

    29245 posts

    I tried adding the lines of code you suggested to the config.php file and it seems to have worked. I’ll do some more testing and confirm.

    Very good. Just keep us in the loop, please.

    The receiving mail server see’s this as a protocol deviation and drops the message.

    I’m not sure that’s very userfriendly behavior. Most SMTP servers seem to manage just fine. That said, I’ll forward this to our dev team.

  • #15 / Mar 22, 2010 4:57pm

    horizonvp

    107 posts

    Solved the problem.  Many thanks for the help!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases