Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Crash when sending an email

edited July 2006 in Vanilla 1.0 Help

We use external SMTP server (our ISP's one) with no authentification (I've left blank the fields ID and pwd). But on each action which sends an email like "join a forum" or "accept as member" ... (with or without ID set) we receive the following error page :
A fatal, non-recoverable error has occurred Technical information (for support personel): Error Message Unable to send email. The SMTP server reported the following error: Affected Elements Email.ServerParse(); The error occurred on or near: 503 Error: authentication not enabled For additional support documentation, visit the Lussumo Documentation website at:

We use this server from our mail client without problem.
Where's the mistake?

Thanks for answer


  • Options
    MarkMark Vanilla Staff
    If you've left the smtp user and smtp password blank, it shouldn't be attempting to authenticate. Here is the code in Vanilla:

    if ($this->Context->Configuration['SMTP_USER'] != '' && $this->Context->Configuration['SMTP_PASSWORD'] != '') { fwrite($Socket, 'EHLO '.$SMTPHost."\r\n"); $this->ServerParse($Socket, '250'); fwrite($Socket, 'AUTH LOGIN'."\r\n"); $this->ServerParse($Socket, '334'); fwrite($Socket, base64_encode($this->Context->Configuration['SMTP_USER'])."\r\n"); $this->ServerParse($Socket, '334'); fwrite($Socket, base64_encode($this->Context->Configuration['SMTP_PASSWORD'])."\r\n"); $this->ServerParse($Socket, '235'); } else { fwrite($Socket, 'HELO '.$SMTPHost."\r\n"); $this->ServerParse($Socket, '250'); }

    If you want to snoop around in the code to see if you can find out what's going wrong, you can find it in library/Framework/Framework.Class.Email.php
  • Options
    edited July 2006
    Thanks Mark (and by the way, congratulations for this awesome job!),

    Sorry, but I try now to remove (or set another value) the SMTP user and password I've set for the test.
    It seems impossible : after I've saved it the old ones are coming back.

    The same test on other fields (for example "Support email address" in the same page ) doesn't show the same problem.

    Ahem ... it seems a little bit "trickier". In fact It's saved only when I answer to the Browser (FF I want to remember the password, when I don't, it doesn't work (I think).

    When I've finally re-tested with SMTP user set to blank I've got the same message with just the difference The error occurred on or near: 554 : Helo command rejected: Invalid name

    As if it sends the "blank user" anyway.

    I'm totaly rookie in PHP (but not with other languages) : how can I verify that your "authentification bypass" (that's I understand in your code) works when the SMTP user field is set to blank?
    As noticed in the error msg, it's the Helo command which is sent so the if ... bypass is working. But the error seems having something to do with the hostname of the sending host. Do you send litteral in this field ? Which one?
  • Options
    MarkMark Vanilla Staff
    First of all, you can manually edit these smtp values if you open up your conf/settings.php file. They should be listed in there as:

    $Configuration['SMTP_HOST'] = ''; $Configuration['SMTP_USER'] = ''; $Configuration['SMTP_PASSWORD'] = '';

    The new error you are getting is a little wierd:

    554 : Helo command rejected: Invalid name

    As I understand it, normally that error will appear like:

    554 5.5.2 <>: Helo command rejected: Invalid name;: Helo command rejected: Invalid name

    So, this implies (to me) that your host name wasn't saved properly and it is actually trying to use a blank one.... or it is using invalid characters that cause the error to be rendered wierd.
  • Options
    edited July 2006
    Connexion parameters storage seems not to be guilty : I've replaced the following line : fwrite($Socket, 'HELO '.$SMTPHost."\r\n"); with hardcoded value fwrite($Socket, 'EHLO '.''."\r\n"); : same error received.

    Any ideas?

    PS: just for information : do I have to flush the cache memory of the browser when I change the PHP code before retry ?
  • Options
    MarkMark Vanilla Staff
    Hmmm. I'm no pro at smtp, that is for sure. As you probably saw in the source, I borrowed all of the smtp code from punbb who borrowed it from another group of developers.

    I don't really know what to tell you. This might be time to start googling smtp interactions.

    Oh, and regarding the cache, the most you'll ever have to do is a hard refresh.
  • Options
    edited July 2006
    All right Mark, I think I've found the mistake :
    HELO verb needs the parameter "is a valid principal host domain name for the client host" (see RFC : point 5.2.5 and

    The smtp server seems to verify that's not his own name which is used to connect (in HELO command) - but it seems not verify that's the real domaine name of the client.

    If I set an arbitrary value (hardcoded) like
    fwrite($Socket, 'HELO'."\r\n");
    and the email received by the user has the header
    Received: from ( [])
    by (Postfix) with SMTP id ...
    I think the solution could be:
    fwrite($Socket, 'HELO'."\r\n");
    but it should be better to set the value from another field set in Application Settings page.

    What do you think about it?
This discussion has been closed.