PHP Classes

smtp_message class error

Recommend this page to a friend!

      MIME E-mail message sending  >  MIME E-mail message sending package blog  >  How Can PHP Send Emai...  >  All threads  >  smtp_message class error  >  (Un) Subscribe thread alerts  
Subject:smtp_message class error
Summary:Error while using the smtp_message class
Messages:8
Author:Carlos Rosão
Date:2008-11-19 12:21:36
Update:2008-11-22 02:13:05
 

  1. smtp_message class error   Reply   Report abuse  
Picture of Carlos Rosão Carlos Rosão - 2008-11-19 12:21:37
I'm using this class for several months now to send emails from all the mail accounts at my company.

I haven't got any problems until today when suddenly appeared this error:
451-The server has reached its limit for processing requests from your host.

This error doesn't depend on the account I'm using to send the email, nor the destination email: I've tried from my domain (schiu.com) to gmail and to hotmail and from gmail, hotmail to my domain.

Since I haven't made changes to the class neither to my script that uses the class, this problem must be originated in the server.

But as I don't have any idea in how to solve the problem, I decided to put it here.

Thanks a lot in advance.

  2. Re: smtp_message class error   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-11-19 17:49:59 - In reply to message 1 from Carlos Rosão
That seems to be a restriction imposed by your server, probably introduced recently by their systems administrators.

Are you using the SetBulkMail function?

  3. Re: smtp_message class error   Reply   Report abuse  
Picture of Carlos Rosão Carlos Rosão - 2008-11-19 18:17:43 - In reply to message 2 from Manuel Lemos
Now I got a different error:
Nao foi possível enviar o mail porque: 550-"JunkMail rejected - bl9-120-111.dsl.telepac.pt (localhost)

So I've puted: $email_message->smtp_debug=1; and got:
Connected to SMTP server "mail.schiu.com".
S 220-server2.raidserver2.com ESMTP Exim 4.69 #1 Wed, 19 Nov 2008 13:07:07 -0500
S 220-We do not authorize the use of this system to transport unsolicited,
S 220 and/or bulk e-mail.
C EHLO localhost
(...)
S 550-"JunkMail rejected - bl9-120-111.dsl.telepac.pt (localhost)
Disconnected.

I'm not using the SetBulkMail function, I need do learn first in the documentation how to use it. Do you think it will solve my problem, or the message: "We do not authorize the use of this system to transport unsolicited and/or bulk e-mail." means I will not be able to send mails from my pc through smtp?

I've mailed the server administrator about this error, but still haven't got an answer...

Thanks a lot for your help.

  4. Re: smtp_message class error   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-11-19 18:36:55 - In reply to message 3 from Carlos Rosão
The SetBulkMail function would make the connection not close between consecutive receipient deliveries.

Anyway, it seems that your ISP does not want you to bulk mail, nothing related to this class.

Maybe you can get away inserting some pauses between deliveries, but you need to figure if that is the actual restriction the ISP is imposing.

  5. Re: smtp_message class error   Reply   Report abuse  
Picture of Carlos Rosão Carlos Rosão - 2008-11-19 18:44:35 - In reply to message 3 from Carlos Rosão
I followed your suggestion and added:
$email_message->SetBulkMail(1);

Now the junk mail error disappeared but the previous error returned.

This is the complete error:
Resolving POP3 authentication host "mail.schiu.com"...
Connecting to host address "*********" port 110...
S +OK Hello there.
C USER test@schiu.com
S +OK Password required.
C PASS ********
S +OK logged in.
Resolving SMTP server domain "mail.schiu.com"...
Connecting to host address "*********" port 25...
Connected to SMTP server "mail.schiu.com".
S 451-The server has reached its limit for processing requests from your host.
Nao foi possível enviar o mail porque: it was not previously established a SMTP connection

Any other suggestion?

Thanks for your availability in answering my questions.

  6. Re: smtp_message class error   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-11-19 19:43:06 - In reply to message 5 from Carlos Rosão
It sees the error message says it all: The server has reached its limit for processing requests from your host.

So there is a limit associated to your host that you reached. Maybe it is a delivery limit by average during a given period, so sending messages in small chunks at a time and rest for a while may solve your problem.

  7. Re: smtp_message class error   Reply   Report abuse  
Picture of Carlos Rosão Carlos Rosão - 2008-11-20 09:49:45 - In reply to message 6 from Manuel Lemos
I'm insisting in this problem, because another error appeared. As it is very different from the previous ones (nothing to do with junk nor with out of limits) I think it is important to discuss it here.

When I try to send emails with the smtp_message class using my gmail account I got the following error:

Resolving POP3 authentication host "pop.gmail.com"...

Connecting to host address "64.233.183.111" port 110...

Nao foi possível enviar o mail porque: could not connect to the host "pop.gmail.com": Connection timed out

A few days ago, with the same configuration, I was able to send emails without a problem!

The important code in my script is as follows:

After including the class files
require("../class/email_message.php");
require("../class/smtp_message.php");
require("../class/smtp.php");

These are the hosts/ports I'm using:
$email_message->smtp_host = "smtp.gmail.com";
$email_message->smtp_port = 465;
$email_message->smtp_ssl = 1;
$email_message->smtp_pop3_auth_host = "pop.gmail.com";

If you need to know how the other parameters in the class are set, just tell me.

One thing I find strange is the port 110 the error displays (I know gmail uses port 995 for pop3), since I don't define the pop3 port in here, I only set it when using your other class (pop3_class).

I don't even know if gmail requires a pop3 authentication before smtp, so I tried to comment the line: $email_message->smtp_pop3_auth_host = "pop.gmail.com";
In this case the following error appeared:

Resolving SMTP server domain "smtp.gmail.com"...
Connecting to host address "66.249.93.111" port 465...
Connected to SMTP server "smtp.gmail.com".
S 220 mx.google.com ESMTP l20sm342114uga.14
C EHLO localhost
S 250-mx.google.com at your service, [82.155.218.35]
S 250-SIZE 35651584
S 250-8BITMIME
S 250-AUTH LOGIN PLAIN
S 250 ENHANCEDSTATUSCODES
Nao foi possível enviar o mail porque: it was not previously established a SMTP connection

Am I using the smpt_message class the wrong way, or do you think this is due to the problems we discussed yesterday?

Thanks again for your availability in answering my questions.

  8. Re: smtp_message class error   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-11-22 02:13:05 - In reply to message 7 from Carlos Rosão
You should leave smtp_pop3_auth_host variable empty because Gmail SMTP server authentication is not done via POP3.