PHP Classes

Gmail Use Authentication

Recommend this page to a friend!

      SMTP E-mail sending class  >  All threads  >  Gmail Use Authentication  >  (Un) Subscribe thread alerts  
Subject:Gmail Use Authentication
Summary:How to implement Use Authentication: Yes to send with Gmail
Messages:17
Author:Said Bakr
Date:2008-03-09 20:38:20
Update:2009-05-01 08:55:28
 
  1 - 10   11 - 17  

  11. Re: Gmail Use Authentication   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-08-04 05:23:43 - In reply to message 10 from nettcom
Are you sure you are using the right account name and password?

  12. Re: Gmail Use Authentication   Reply   Report abuse  
Picture of nettcom nettcom - 2008-08-04 12:09:49 - In reply to message 11 from Manuel Lemos
Hi, Manuel

thanks for help!

after revise and try I found the problem:
when real_name variable is empty this work perfectly! other wise not work.

Manuel, I have 1 server (dedicate), and from my home linux pc (runing a php process & ) I am sending mails to this modified class hosted at my server using fsockopen to post mails [delivery directly] like a remote smtp server.

and working sending 30 mails for minute, have any idea about how we can improve more speed in this script or similar someting?

why not use exim? becouse I need the control over MTA transaction to handle bounced mail in real time, updating my database, not returning "delivery mail" from local, only from remote MTA after sended,

have any ideia about best realtime bounced handle?

regards,



  13. Re: Gmail Use Authentication   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-08-04 13:34:11 - In reply to message 12 from nettcom
Your goal is utopic. If you send a message to an invalid address, Gmail will not tell you that is invalid when the message is sent. So, it is pointless to expect to receive a delivery success message when you send via SMTP.

Using sendmail or compatible (qmail, postfix, exim) is a much faster way to queue many messages for delivery.

  14. Re: Gmail Use Authentication   Reply   Report abuse  
Picture of nettcom nettcom - 2008-08-04 14:38:35 - In reply to message 13 from Manuel Lemos
I Am not using gmail (thas was a test),
I am delivering directly. **$direct_delivery=1;**

them your script is working as a SMTP Relay (gateway) them parse the return error:
$erro=$smtp->error;
$cod=substr($erro,0,3);
//atualiza($para,$cod,$erro,1);
echo"==|$cod==|$erro==|";
$newfile2 = fopen("invalidos.txt", "a");
$x=$log[2];
fputs($newfile2, "$para|$x\n");
fclose($newfile2);
:)


  15. Re: Gmail Use Authentication   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-08-04 16:16:39 - In reply to message 14 from nettcom
Direct delivery is the fastest way to make messages reach the final SMTP server, but it is the way that makes your delivery script take more time because it has to wait for the destination SMTP server to reply.

Another problem is that many SMTP servers will not accept the messages right away because of grey listing. So you need to handle transient delivery problems like this.

A different approach is to let a sendmail or compatible MTA take care of the delivery setting the return-path address to an e-mail address of with a POP3 mailbox to receive the bounced messages.

Then you can use a POP3 client and a message parser class to process the bounced messages:

phpclasses.org/pop3class

phpclasses.org/mimeparser

  16. Re: Gmail Use Authentication   Reply   Report abuse  
Picture of Dhiju Dhiju - 2008-09-20 12:42:19 - In reply to message 11 from Manuel Lemos
gg

  17. Re: Gmail Use Authentication   Reply   Report abuse  
Picture of keerthi bandara keerthi bandara - 2009-05-01 08:55:28 - In reply to message 5 from neeraj kumar
I have came across the same issue and both my User name and password were correct. Fortunately I was able to resolve it by doing following changes to the parameters passed in. (I'm using a my google app domain herewith)

Normally these 2 parameters look like this.

$smtp->user="[email protected]";
/* Set to the user name if the server requires authetication */

$smtp->realm="";

This gave me the exact error you've given. So I changed that to this (after sniffing around for few hours ;-))

$smtp->user="keerthi";
/* Set to the user name if the server requires authetication */

$smtp->realm="mydomain.com";

Ta da.. it worked, I don't know what is the internal stuff going wrong with the old settings, but this resolved my issue.

Hope this will be useful for someone since this thread is some what old.




 
  1 - 10   11 - 17