Author Topic: (sending) new email not working  (Read 4237 times)

SJL008

  • Newbie
  • *
  • Posts: 7
    • View Profile
(sending) new email not working
« on: March 03, 2010, 11:14:43 am »
Launched new Feng O, and everything is great; however, when I send new email, I get this response:




Can I change some coding in the php? in the swift mail authentication?
« Last Edit: March 04, 2010, 01:38:46 am by SJL008 »

SJL008

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: (sending) new email not working
« Reply #1 on: March 03, 2010, 11:16:58 am »
And yes, ALL the settings for incoming/outgoing are standard 'outlook'/ godaddy settings.....

I'm using 'port '80' which works great btw.

Please help  ???

SJL008

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: (sending) new email not working
« Reply #2 on: March 04, 2010, 11:00:28 am »
Is it accessible to check somehow? I think the php should be like this right?

<?php
/* SEND EMAIL FUNCTIONS */

//Authenticate Send -
//This will send an email using auth smtp and output a log array
//logArray - connection,

function authSendEmail($from, $namefrom, $to, $nameto, $subject, $message)
{
    //SMTP + SERVER DETAILS
    /* * * * CONFIGURATION START * * * */
    $smtpServer = "mail.server.com";
    $port = "25";
    $timeout = "30";
    $username = "smtpusername";
    $password = "smtppassword";
    $localhost = "localhost";
    $newLine = "\r\n";
    /* CONFIGURATION END */
    
    //Connect to the host on the specified port
    $smtpConnect = fsockopen($smtpServer, $port, $errno, $errstr, $timeout);
    $smtpResponse = fgets($smtpConnect, 515);
    if(empty($smtpConnect))
    {
        $output = "Failed to connect: $smtpResponse";
        return $output;
    }
    else
    {
        $logArray['connection'] = "Connected: $smtpResponse";
    }

    //Request Auth Login
    fputs($smtpConnect,"AUTH LOGIN" . $newLine);
    $smtpResponse = fgets($smtpConnect, 515);
    $logArray['authrequest'] = "$smtpResponse";
    
    //Send username
    fputs($smtpConnect, base64_encode($username) . $newLine);
    $smtpResponse = fgets($smtpConnect, 515);
    $logArray['authusername'] = "$smtpResponse";
    
    //Send password
    fputs($smtpConnect, base64_encode($password) . $newLine);
    $smtpResponse = fgets($smtpConnect, 515);
    $logArray['authpassword'] = "$smtpResponse";

    //Say Hello to SMTP
    fputs($smtpConnect, "HELO $localhost" . $newLine);
    $smtpResponse = fgets($smtpConnect, 515);
    $logArray['heloresponse'] = "$smtpResponse";
    
    //Email From
    fputs($smtpConnect, "MAIL FROM: $from" . $newLine);
    $smtpResponse = fgets($smtpConnect, 515);
    $logArray['mailfromresponse'] = "$smtpResponse";
        
    //Email To
    fputs($smtpConnect, "RCPT TO: $to" . $newLine);
    $smtpResponse = fgets($smtpConnect, 515);
    $logArray['mailtoresponse'] = "$smtpResponse";
    
    //The Email
    fputs($smtpConnect, "DATA" . $newLine);
    $smtpResponse = fgets($smtpConnect, 515);
    $logArray['data1response'] = "$smtpResponse";
    
    //Construct Headers
    $headers  = "MIME-Version: 1.0" . $newLine;
    $headers .= "Content-type: text/html; charset=iso-8859-1" . $newLine;
    $headers .= "To: $nameto <$to>" . $newLine;
    $headers .= "From: $namefrom <$from>" . $newLine;
    
    fputs($smtpConnect, "To: $to\nFrom: $from\nSubject: $subject\n$headers\n\n$message\n.\n");
    $smtpResponse = fgets($smtpConnect, 515);
    $logArray['data2response'] = "$smtpResponse";
    
    // Say Bye to SMTP
    fputs($smtpConnect,"QUIT" . $newLine);
    $smtpResponse = fgets($smtpConnect, 515);
    $logArray['quitresponse'] = "$smtpResponse";    
}
?>


Heeelp!
« Last Edit: March 04, 2010, 11:02:46 am by SJL008 »

lukacsp

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: (sending) new email not working
« Reply #3 on: March 09, 2010, 06:35:18 am »
Put these lines to the config/config.php:

  define('SWIFT_AUTHENTICATOR', 'PLAIN');
  define('DEFAULT_SWIFT_AUTHENTICATOR', 'PLAIN');

I hope it helps, if i remember correctly i had the same error and that was the cure  ;)

SJL008

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: (sending) new email not working
« Reply #4 on: March 09, 2010, 09:02:23 pm »
[
quote author=lukacsp link=topic=3857.msg14286#msg14286 date=1268127318]
Put these lines to the config/config.php:

  define('SWIFT_AUTHENTICATOR', 'PLAIN');
  define('DEFAULT_SWIFT_AUTHENTICATOR', 'PLAIN');

I hope it helps, if i remember correctly i had the same error and that was the cure  ;)
[/quote]
You mean in the: <rootfile>/config/config.php

Or, in the databsae side...?

config/config.php looks like this:
<?php
  define('DB_ADAPTER', 'mysql');
  define('DB_HOST', 'palm555.db.5749792.hostedresource.com');
  define('DB_USER', '**me**');
  define('DB_PASS', '**nevertell**');
  define('DB_NAME', '**isaSecret**');
  define('DB_PERSIST', true);
  define('TABLE_PREFIX', 'og_');
  define('DB_ENGINE', 'InnoDB');
  define('ROOT_URL', 'http://aviation.com/foe');
  define('DEFAULT_LOCALIZATION', 'en_us');
  define('COOKIE_PATH', '/');
  define('DEBUG', false);
  define('SEED', 'fe9b4d81b8b33de7851e3aagga3c768c');
  define('DB_CHARSET', 'utf8');
  return true;
?>

Do I just drop it in somewhere???

thnks in advance!
J
« Last Edit: March 09, 2010, 09:03:59 pm by SJL008 »

lukacsp

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: (sending) new email not working
« Reply #5 on: March 10, 2010, 05:59:41 am »
Yes, just put it to the config.php, for example:

<?php
  define('DB_ADAPTER', 'mysql');
  define('DB_HOST', 'palm555.db.5749792.hostedresource.com');
  define('DB_USER', '**me**');
  define('DB_PASS', '**nevertell**');
  define('DB_NAME', '**isaSecret**');
  define('DB_PERSIST', true);
  define('TABLE_PREFIX', 'og_');
  define('DB_ENGINE', 'InnoDB');
  define('ROOT_URL', 'http://aviation.com/foe');
  define('DEFAULT_LOCALIZATION', 'en_us');
  define('COOKIE_PATH', '/');
  define('DEBUG', false);
  define('SEED', 'fe9b4d81b8b33de7851e3aagga3c768c');
  define('DB_CHARSET', 'utf8');
 define('SWIFT_AUTHENTICATOR', 'PLAIN');
  define('DEFAULT_SWIFT_AUTHENTICATOR', 'PLAIN');
  return true;
?>

SJL008

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: (sending) new email not working
« Reply #6 on: March 10, 2010, 02:03:07 pm »
Still have the same issue, same on the first post picture  :(