Warning: fsockopen() expects parameter 2 to be long, string given

Im lost, I switched to google apps so I dont have my internal smtp server anymore. Thats fine Ill just use google's. Well for the life of me I cant get it to work. Im sure Im missing something small. Please someone help me. Here is the error
-----
Warning: fsockopen() expects parameter 2 to be long, string given in C:\Program Files\Apache Group\Apache2\htdocs\custom\clockin\includes\phpmailer\class.smtp.php on line 105
Message was not sent
Mailer Error: SMTP Error: Could not connect to SMTP host.
-----

Here is the code at line 105 of class.smtp.php

$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 <----line 105----<

$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 <----line 105----<

What does it say? You could try casting $port

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

Here is my code I am passing. I should have specified I am using PhPMailer

<?phprequire("class.phpmailer.php");$mailer = new PHPMailer();$mailer->IsSMTP();$mailer->Host = 'ssl://smtp.google.com';$mailer->Port = '465';$mailer->SMTPAuth = true;$mailer->Username = 'username@domain.com'; // Change this to your gmail adress$mailer->Password = 'password'; // Change this to your gmail password$mailer->From = 'username@domain.com'; // This HAVE TO be your gmail adress$mailer->FromName = 'fake'; // This is the from name in the email, you can put anything you like here$mailer->Body = 'This is the main body of the email';$mailer->Subject = 'This is the subject of the email';$mailer->AddAddress('username@domain.com'); // This is where you put the email adress of the person you want to mailif(!$mailer->Send()){ echo "Message was not sent<br/ >"; echo "Mailer Error: " . $mailer->ErrorInfo;}else{ echo "Message has been sent";}?>

Ah i think I found it, I added $host and $port manually and I get "Warning: fsockopen(): no SSL support in this build in C:\Program Files\Apache Group\Apache2\htdocs\custom\clockin\includes\phpmailer\class.smtp.php on line 106"

How do I enable SSL support for fsockopen or at least confirm it supports it or not?

I don't know, I'm a Linux type, not a Windows type. If you think that you are going to have loads of problems, why not just bite the bullet and install XAMPP which would give you PHP5, OpenSSL, etc. etc.

Its not really my server, I mean it is but its a thrid part software that uses php4. I dont want to just go in and change settings :) It is a windows box but I am a linux guy too. Think Ill just make a box for this lol

Featured Post

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

There was an incident about the POP3 issue for the double read receipts and delivery receipts in Exchange 2013. There was huge research been done and found solution for the duplicate mails. Especially when the user gets duplicate mails.

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption. Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…

Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…