Login   Register  
PHP Classes
elePHPant
Icontem

Bulk Mail SMTP

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      MIME E-mail message sending  >  All threads  >  Bulk Mail SMTP  >  (Un) Subscribe thread alerts  
Subject:Bulk Mail SMTP
Summary:Sending mass emails personalized + SMTP auth
Messages:14
Author:Barbara motta
Date:2011-08-24 23:43:48
Update:2012-02-12 15:33:27
 
  1 - 10   11 - 14  

  1. Bulk Mail SMTP   Reply   Report abuse  
Picture of Barbara motta
Barbara motta
2011-08-24 23:43:48
Great job, I really enjoy this class!
I have a mail list - database, and I need to do a loop and send each one, with smtp authentication. I tried, but the error: Failure to connect to SMTP server occurs, in the end, if I have a mail list with 7 contacts, only the first one and another 2 contacts receive the e-mail.
I read the forum and examples about bulk mail, but everyone I test I can't put the SMTP authentication.
I tried to put all the recipients as BCC, but I had problems because are more than 6,000 contacts.

Thanks so much!

  2. Re: Bulk Mail SMTP   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2011-08-25 03:58:39 - In reply to message 1 from Barbara motta
If it says failure to connect, it is because there is something wrong in the host name, port or SSL/TLS settings.

Can you send a message at least to one recipient?

  3. Re: Bulk Mail SMTP   Reply   Report abuse  
Picture of Barbara motta
Barbara motta
2011-08-25 04:26:30 - In reply to message 2 from Manuel Lemos
Yeah, I can send message for one recipient, but I'm trying do it with loop, I invoke the method Send. For example:

for ($i=0; $i<sizeof($emails);$i++) {
$email_message->Send();
}

I think ,Because open a connection for each email sended.
Maybe the SMTP server block simultaneous connections, can be that?
Now I'm trying make a loop with the method Send until -> Send returns (strlen = 0)
For example, like a refresh ...

  4. Re: Bulk Mail SMTP   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2011-08-25 04:54:51 - In reply to message 3 from Barbara motta
If you call the SetBulkMail function like in the test_personalized_bulk_mail.php example, the SMTP server connection is only established once.

  5. Re: Bulk Mail SMTP   Reply   Report abuse  
Picture of Barbara motta
Barbara motta
2011-08-25 05:18:41 - In reply to message 4 from Manuel Lemos
I tried with this example, but didn't worked, no send any email, I change the class "email_message_class" to "smtp_message_class"...but didn't like this:

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

$email_message=new smtp_message_class;

$email_message->smtp_host="smtp.osa.terra.com.br";
$email_message->localhost="localhost";
$email_message->smtp_port=25;
$email_message->smtp_ssl=0;
$email_message->smtp_start_tls=0;
$email_message->smtp_http_proxy_host_name='';
$email_message->smtp_http_proxy_host_port=3128;
$email_message->smtp_socks_host_name = '';
$email_message->smtp_socks_host_port = 1080;
$email_message->smtp_socks_version = '5';
$email_message->smtp_direct_delivery=0;
$email_message->smtp_exclude_address="";
$email_message->smtp_user="xxxxx@terra.com.br";
$email_message->smtp_password="xxxxxx";
$email_message->smtp_pop3_auth_host="";
$email_message->smtp_realm="xxxxx@terra.com.br";
$email_message->smtp_workstation="";
$email_message->smtp_authentication_mechanism="";
$email_message->smtp_debug=0;
$email_message->smtp_html_debug=1;
$email_message->maximum_bulk_deliveries=0;
$email_message->cache_body =1;

and the code is the same to test_bulk_mail

  6. Re: Bulk Mail SMTP   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2011-08-25 07:05:28 - In reply to message 5 from Barbara motta
What do you mean "it didn't like this?" Does it fail with same error? What is the error?

  7. Re: Bulk Mail SMTP   Reply   Report abuse  
Picture of Barbara motta
Barbara motta
2011-08-25 07:44:27 - In reply to message 6 from Manuel Lemos
Thanks so much...
I resolved the problem, the bulk mail can send 6,000 at once?
I need configure something else?

  8. Re: Bulk Mail SMTP   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2011-08-25 08:12:00 - In reply to message 7 from Barbara motta
It only depends on any limits imposed by the SMTP server.

Anyway, relaying messages to remote SMTP servers is not a good idea to send bulk mail. It is usually very slow and prone to connection failures.

If possible it is better to relay on the local e-mail server. You may want to read this article for more details:

http://www.phpclasses.org/blog/package/9/post/2-The-Fastest- ...

  9. Re: Bulk Mail SMTP   Reply   Report abuse  
Picture of Barbara motta
Barbara motta
2011-08-25 08:38:34 - In reply to message 8 from Manuel Lemos
Thanks!
I'll read the article! But I have a VPS just to do that.
Just one more question, I promisse!
I'm starting to develop in php...

I have e-mails in MySql and I can't do the array the right way:
I need:
$to=array(
array(
"address"=>"barbara_damotta@yahoo.com.br",
"name"=>"Yahoo"
),
array(
"address"=>"rafeldamotta@gmail.com",
"name"=>"GMAIL"
)
);

I did:

$to = array();
for($i=0;$i<$elements;$i++) {

$destinatarios = array(
"address"=> $mailling[$i]['cnt_email'],
"name"=>$mailling[$i]['cnt_nome'],
"nvi_id"=>$mailling[$i]['nvi_id']
);

$to = array_merge($to,$destinatarios);
}

I need in the loop add arrays in the main array.

Thank so much!

  10. Re: Bulk Mail SMTP   Reply   Report abuse  
Picture of Barbara motta
Barbara motta
2011-08-25 11:37:33 - In reply to message 9 from Barbara motta
I just finish this part! Now, I have one more problem, when I receive the e-mail the body is duplicated.
For example:
The first one e-mail it's ok, the second the body cames duplicate, the third one cames with 3 message body.

the cache_body = 0

it's a personalized e-mail.

thanks

 
  1 - 10   11 - 14