Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Solved: Mailing system. User registration/pw reset

Asked Modified Viewed 3,834 times
F
FallFromINFINITY
F
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
asked
Newbie

I have tried nearly all things mentioned on this site, and any site I could find, for that matter. I'm using a Google Apps email address, to send mails for User Registration confirmation and Password Reset. I have also tried a basic GMail email address, with identical results.

For smtp host, I have tried everything from smtp.google.com to SSL://smtp.google.com
I have tried both ports that Google states they use, 465 and 587
My account name, and password are correct, I have checked this many times.

When the host is set as smtp.google.com with port 465, after submitting, the page loads for an extensive period of time, only to return a completely blank page.
All other attempts return an immediate error saying that the registration email could not be sent.

In error logs, i have found this:
fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport &quot;ssl&quot;)

as an error from class.smtp.php, on the Registration page.

This error, and problems were happening prior to editing any files. I attempted to edit class.smtp.php, changing the default SMTP port from 25 to google's suggested ports, both 465 and 587, which did not seem to change the results of any of these, at all. I've tried editing sendmail_include.php to replace the data, host/port/user/pass/auth, with the actual data, to see if it was a problem with the database, and again resulting in identical errors.

In a, rather pointless attempt, I edited the PHP.ini mail function, but once again, returning no noticeably different results.

The site is brand new, and the problems have been happening from the start. I'm using WAMP 2.2a with PHPFusion 7.02.03

Currently running a basic version of Windows XP SP3, 32 bit, if it has any meaning in this problem.

Does anyone have any ideas as to how to solve this?
Edited by FallFromINFINITY on 20-10-2011 02:58,
0 replies

4 posts

N
NetriX
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
answered
Senior Member

You may need to try out the latest updates.

So, test the latest updates. I don't use this feature.

http://php-fusion.svn.sourceforge.net/viewvc/php-fusion/trunk/files/includes/
Edited by NetriX on 20-10-2011 10:16,
0 replies
F
FallFromINFINITY
F
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Newbie

I have tried downgrading the entire core to 7.00.xx and 7.01.00-06, and have no such luck. In fact, I cannot get past setup, where it requests username and password for the MySQL database. I am currently down to 7.02.00, and still no luck. I have tried all combinations of the past versions of the files class.smtp.php, sendmail_include.php, and class.phpmailer.php from that link.

I've spent 4 hours today, attempting to find out what the problem was. I have searched all the pages, maincore.php, registration.php, and the includes listed above. I cannot find anything wrong, that would be causing this problem.

I found this:
<?php
       require_once "Mail.php";

        $from = "<from.gmail.com>";
        $to = "<to.yahoo.com>";
        $subject = "Hi!";
        $body = "Hi,\n\nHow are you?";

        $host = "ssl://smtp.gmail.com";
        $port = "465";
        $username = "<myaccount.gmail.com>";
        $password = "password";

        $headers = array ('From' => $from,
          'To' => $to,
          'Subject' => $subject);
        $smtp = Mail::factory('smtp',
          array ('host' => $host,
            'port' => $port,
            'auth' => true,
            'username' => $username,
            'password' => $password));

        $mail = $smtp->send($to, $headers, $body);

        if (PEAR::isError($mail)) {
          echo("<p>" . $mail->getMessage() . "</p>");
         } else {
          echo("<p>Message successfully sent!</p>");
         }
    ?>

Although looking promising, nowhere does it mention what Mail.php is, so that ends up a dead end.

A note, that with PHP Fusion 7.02.00, the reset password page does not error, changing the password and stating that the password was sent to the email, but upon checking both the receiving and the sending email accounts, no records of it happening.
The error log states that class.smtp.php is erroring on line 112, which oddly enough is blank. Here is the block of code before, and after line 112, leading up to the fsockopen().
     #make sure we are __not__ connected
    if($this->connected()) {
      # ok we are connected! what should we do?
      # for now we will just give an error saying we
      # are already connected
      $this->error = array("error" => "Already connected to a server");
      return false;
    }

    if(empty($port)) {
      $port = $this->SMTP_PORT;
    }

    #connect to the smtp server
    $this->smtp_conn = fsockopen($host,    # the host of the server
                                 $port,    # the port to use
                                 $errno,   # error number if any
                                 $errstr,  # error message if any
                                 $tval);   # give up after ? secs

I changed the timeout to 60, because when the smtp host is set to smtp.gmail.com (no ssl://), it lasts the full timeout then returns a blank screen, so I doubled it, to see if it was working, but not able to complete due to lack of time. This unfortunately does not seem the case either.

From Admin>PHP info:
Webserver software: Apache/2.2.21 (Win32) PHP/5.3.8
PHP version: 5.3.8
PHP interface: apache2handler
MySQL Server version: 5.5.16-log
PHPFusion version: 7.02.0
0 replies
N
NetriX
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
answered
Senior Member

Gmail requires you to use SSL authentication, a further step is required if you don't already have php configured for this:

1. open your php.ini file, and find the windows extensions part. Now uncomment the extension=php_openssl.dll.

2. Save the php.ini file and restart your server.

3.Try running your php again, it should send the mail.
0 replies
F
FallFromINFINITY
F
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Newbie

I could shoot myself for forgetting that. Reverted all files back to their original, enabled SSL, and it worked.

Thank you for that, and my apologies for any time you spent trying to search for solutions.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 4 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

N
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
F
F
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet