I'm using the latest swiftmail.
I had it doing all kinds of cool stuff on hostgator.com server, but then the fun came to a hault.
I can no longer send emails out to place like hotmail and lycos mail.
When I setup outlook they required I check "my server requires authentification" the settings are the same as my incoming settings, and they require you use port 26 instead of 25.
this is all working fine.
<?php
require_once "lib/EasySwift.php";
require_once "lib/Swift/Connection/SMTP.php";
require_once 'lib/Swift/Authenticator/PopB4Smtp.php';
$smtp->attachAuthenticator(new Swift_Authenticator_PopB4Smtp("pop.shasheenmachine.com"));
$smtp->setUsername("me@shasheenmachine.com");
$smtp->setPassword("me_password");
$swift =& new Swift(new Swift_Connection_SMTP("mail.shasheenmachine.com"));
it's parcing the scripts for sure. here is my error:
Fatal error: Call to a member function on a non-object in /home/me/public_html/checkout.php on line 8
line 8 being - $smtp->attachAuthenticator(new Swift_Authenticator_PopB4Smtp("pop.shasheenmachine.com")); I've changed this to mail.shasheenmachine.com and I've tried changing the username to my account username instead of email address. I don't have any more ideas.
I need this to work because my form sends a sales reciept to clients outside the hostgator realm.
authenticating troubles
Moderators: Chris Corbyn, General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: authenticating troubles
Where did $smtp appear from?

If you're not using EasySwift don't include it (in fact, don't use it anyway
). If you're not using PHP4 the ampersands don't need to be there neither.
Code: Select all
<?php
require_once "lib/EasySwift.php";
require_once "lib/Swift/Connection/SMTP.php";
require_once 'lib/Swift/Authenticator/PopB4Smtp.php';
$smtp =& new Swift_Connection_SMTP("mail.shasheenmachine.com");
$smtp->attachAuthenticator(new Swift_Authenticator_PopB4Smtp("pop.shasheenmachine.com"));
$smtp->setUsername("me@shasheenmachine.com");
$smtp->setPassword("me_password");
$swift =& new Swift($smtp);If you're not using EasySwift don't include it (in fact, don't use it anyway
Re: authenticating troubles
Same message is returning. I recently recieved a lobotomy so I'm going to need you again.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: authenticating troubles
You're getting that same error with the code I posted? 
Post what you've done please, it's not possible to get that error if you've read my code properly, otherwise it's a different error or you've not changed your code accordingly. Note that I *created* the $smtp variable in my version; your version was never creating it.Fatal error: Call to a member function on a non-object in /home/me/public_html/checkout.php on line 8
Re: authenticating troubles
Sorry I missed the variable. I recieved a bunch of new errors
Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/ricnut/public_html/ricnut/lib/Swift/Authenticator/PopB4Smtp/Pop3Connection.php on line 129
Warning: fsockopen() [function.fsockopen]: unable to connect to pop.shasheenmachine.com:110 in /home/ricnut/public_html/ricnut/lib/Swift/Authenticator/PopB4Smtp/Pop3Connection.php on line 129
Fatal error:
Uncaught Error of type [swift_connectionexception] with message [The POP3 connection failed to start. The error string returned from fsockopen() is [Success] #0]
@0 swift::swift() in /home/ricnut/public_html/ricnut/checkout.php on line 12
@1 swift::connect() in /home/ricnut/public_html/ricnut/lib/Swift.php on line 109
@2 swift::handshake() in /home/ricnut/public_html/ricnut/lib/Swift.php on line 230
@3 swift_connection_smtp::postconnect() in /home/ricnut/public_html/ricnut/lib/Swift.php on line 286
in /home/ricnut/public_html/ricnut/lib/Swift/Errors.php on line 99
below is my checkout.php file line 12
Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/ricnut/public_html/ricnut/lib/Swift/Authenticator/PopB4Smtp/Pop3Connection.php on line 129
Warning: fsockopen() [function.fsockopen]: unable to connect to pop.shasheenmachine.com:110 in /home/ricnut/public_html/ricnut/lib/Swift/Authenticator/PopB4Smtp/Pop3Connection.php on line 129
Fatal error:
Uncaught Error of type [swift_connectionexception] with message [The POP3 connection failed to start. The error string returned from fsockopen() is [Success] #0]
@0 swift::swift() in /home/ricnut/public_html/ricnut/checkout.php on line 12
@1 swift::connect() in /home/ricnut/public_html/ricnut/lib/Swift.php on line 109
@2 swift::handshake() in /home/ricnut/public_html/ricnut/lib/Swift.php on line 230
@3 swift_connection_smtp::postconnect() in /home/ricnut/public_html/ricnut/lib/Swift.php on line 286
in /home/ricnut/public_html/ricnut/lib/Swift/Errors.php on line 99
below is my checkout.php file line 12
Code: Select all
require_once "lib/EasySwift.php";
require_once "lib/Swift/Connection/SMTP.php";
require_once 'lib/Swift/Authenticator/@PopB4Smtp.php';
$smtp =& new Swift_Connection_SMTP("mail.shasheenmachine.com");
$smtp->attachAuthenticator(new Swift_Authenticator_PopB4Smtp("pop.shasheenmachine.com"));
$smtp->setUsername("me@shasheenmachine.com");
$smtp->setPassword("me_PASSWORD");
$swift =& new Swift($smtp);
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: authenticating troubles
From what I can tell from errors you posted, it seems that the host your're trying to connect to isn't available at the moment. Check to see that your settings are right.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: authenticating troubles
Indeed. PHP's fsockopen() function is throwing the errorEverLearning wrote:From what I can tell from errors you posted, it seems that the host your're trying to connect to isn't available at the moment. Check to see that your settings are right.