PHP Classes

not works

Recommend this page to a friend!

      SMTP E-mail sending class  >  All threads  >  not works  >  (Un) Subscribe thread alerts  
Subject:not works
Summary:not works with gmail
Messages:31
Author:ahmet guven
Date:2007-03-07 02:36:28
Update:2009-09-08 17:47:05
 
  1 - 10   11 - 20   21 - 30   31 - 31  

  11. Re: not works   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-06-25 16:58:36 - In reply to message 10 from Neerav Modi
You also need other class files that come with sasl.php to implement either plain or login authentication methods. Make sure you are have login_sasl_client.php and plain_sasl_client.php in the same directory as sasl.php .

  12. Re: not works   Reply   Report abuse  
Picture of Neerav Modi Neerav Modi - 2007-06-25 17:30:28 - In reply to message 11 from Manuel Lemos
The other files were there, but the login_sasl_client.php wasn't transfered properly. Uploaded again. Working properly!

This is going to be used in my gmail-mobile app, a way to access Gmail accounts on ANY mobile (in WML and XHTML) since Sept 2004, and now on any PC too. http://gmobile.sayni.net

I will now attempt to use the MIME class for well formatted messages.

Excellent and easy to use class. Thank you for your help and quick reply. All the best!

  13. Re: not works   Reply   Report abuse  
Picture of timsassen timsassen - 2007-10-16 13:43:42 - In reply to message 2 from Manuel Lemos
Hi,

I'm trying to use the smtp class but i'm not really working all that well.
Here'e what i did:

I've downloaded the smtp class and the sasl class (which comes with 6 other file's: login_sasl_client, ntlm_sasl_client, etc...). These files all reside in one folder on my server.
I've required() the sasl file
I've used the example file you've written. Filled the var with is what I think the right info:

$from="<<private>>@gmail.com"; /* Change this to your address like "me@mydomain.com"; */ $sender_line=__LINE__;
$to="<<private>>@gmail.com"; /* Change this to your test recipient address */ $recipient_line=__LINE__;

if(strlen($from)==0)
die("Please set the messages sender address in line ".$sender_line." of the script ".basename(__FILE__)."\n");
if(strlen($to)==0)
die("Please set the messages recipient address in line ".$recipient_line." of the script ".basename(__FILE__)."\n");

$smtp=new smtp_class;

$smtp->host_name="smtp.gmail.com"; /* Change this variable to the address of the SMTP server to relay, like "smtp.myisp.com" */
$smtp->host_port=465; /* Change this variable to the port of the SMTP server to use, like 465 */
$smtp->ssl=0; /* Change this variable if the SMTP server requires an secure connection using SSL */
$smtp->localhost="localhost"; /* Your computer address */
$smtp->direct_delivery=0; /* Set to 1 to deliver directly to the recepient SMTP server */
$smtp->timeout=10; /* Set to the number of seconds wait for a successful connection to the SMTP server */
$smtp->data_timeout=0; /* Set to the number seconds wait for sending or retrieving data from the SMTP server.
Set to 0 to use the same defined in the timeout variable */
$smtp->debug=1; /* Set to 1 to output the communication with the SMTP server */
$smtp->html_debug=1; /* Set to 1 to format the debug output as HTML */
$smtp->pop3_auth_host=""; /* Set to the POP3 authentication host if your SMTP server requires prior POP3 authentication */
$smtp->user="<<private>>"; /* Set to the user name if the server requires authetication */
$smtp->realm=""; /* Set to the authetication realm, usually the authentication user e-mail domain */
$smtp->password="<<private>>"; /* Set to the authetication password */
$smtp->workstation=""; /* Workstation name for NTLM authentication */
$smtp->authentication_mechanism=""; /* Specify a SASL authentication method like LOGIN, PLAIN, CRAM-MD5, NTLM, etc..
Leave it empty to make the class negotiate if necessary */



this resolves to the following error messages:
i.e. <<private>> contains private info
any ideas




Resolving SMTP server domain "smtp.gmail.com"...
Connecting to host address "66.249.93.109" port 465...
Connected to SMTP server "smtp.gmail.com".
Cound not send the message to timsassen@gmail.com. Error: it was not possible to read line from the SMTP server: data access time out

  14. Re: not works   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-10-16 15:55:13 - In reply to message 13 from timsassen
It is very likely that you have outgoing port 465 blocked in your machine network. With that port blocked, you cannot access Gmail SMTP server. Please check with your system administrator.

  15. Re: not works   Reply   Report abuse  
Picture of Neerav Modi Neerav Modi - 2007-10-17 04:02:10 - In reply to message 13 from timsassen
Some possibilities:

1) $smtp->ssl=1
2) If port 465 doesn't work, you can also use 587
3) A common mistake to correct: the username should be the full email address, not just the username

--
Neerav

  16. Re: not works   Reply   Report abuse  
Picture of ngie sing wang ngie sing wang - 2007-12-17 21:53:15 - In reply to message 8 from Roman Wiget
Cound not send the message to ngiesingwang@gmail.com. Error: establishing SSL connections requires the OpenSSL extension enabled...

wat is this problem?

  17. Re: not works   Reply   Report abuse  
Picture of ngie sing wang ngie sing wang - 2007-12-17 22:35:22 - In reply to message 16 from ngie sing wang
Cound not send the message to ngiesingwang@gmail.com. Error: establishing SSL connections requires the OpenSSL extension enabled

i already change the SSL=1 and also change the php.ini
extension=php_openssl.dll (open the openssl.dll already)

any idea about the problem?

  18. Re: not works   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-12-18 01:24:28 - In reply to message 17 from ngie sing wang
If you are using PHP from a Web server, maybe you need to restart the Web server in order to let changes in php.ini make effect.

  19. Re: not works   Reply   Report abuse  
Picture of ngie sing wang ngie sing wang - 2007-12-18 14:28:24 - In reply to message 18 from Manuel Lemos
problem occurs "Cound not send the message to ngiesingwang@gmail.com. Error: establishing SSL connections requires the OpenSSL extension enabled"

i have no idea how to solve tis problem..

let u know the setting that i set in the "test_smtp.php"
---------------------------------------------------------

require("smtp.php");
require("sasl.php");

$from="ngiesingwang@gmail.com"; $sender_line=__LINE__;
$to="ngiesingwang@gmail.com"; $recipient_line=__LINE__;

if(strlen($from)==0)
die("Please set the messages sender address in line ".$sender_line." of the script ".basename(__FILE__)."\n");
if(strlen($to)==0)
die("Please set the messages recipient address in line ".$recipient_line." of the script ".basename(__FILE__)."\n");

$smtp=new smtp_class;

$smtp->host_name="smtp.gmail.com"; /* Change this variable to the
$smtp->host_port=587;
$smtp->ssl=1;
$smtp->localhost="localhost";
$smtp->direct_delivery=0;
$smtp->timeout=10;

$smtp->data_timeout=0;
$smtp->debug=1;
$smtp->html_debug=1;
$smtp->pop3_auth_host="";
$smtp->user="";
$smtp->realm="";
$smtp->password="";
$smtp->workstation="";
$smtp->authentication_mechanism="";

i run tis script in the browser....but error prompt

can u let me know clearly abt the possible problem on it?....


  20. Re: not works   Reply   Report abuse  
Picture of Neerav Modi Neerav Modi - 2007-12-19 05:09:25 - In reply to message 19 from ngie sing wang
$smtp->user="";
$smtp->password="";

should be:

$smtp->user="ngiesingwang@gmail.com";
$smtp->password="yourGmailAccountPassword";

--
Neerav

 
  1 - 10   11 - 20   21 - 30   31 - 31