Bulk mailing - How manage wrong e-mail address ??

Hi all,

I did a bulk mailing application but I’ve got the problem that when it find a wrong e-mail address it stops.
Did someone make some similar application ? How did you manage this exceptions ??
How can I manage errors about memory storage overload in advance ?

Fatal error: Uncaught exception ‘Swift_TransportException’ with message ‘Expected response code 250 but got code “452”, with message "452 4.1.0 4YXB1n00v4QoilJ01YXRtH too many messages per session, try again later "’ in /web/htdocs/www.motoclub.bergamo.it/home/3m/_lib/prod/third/swift/classes/Swift/Transport/AbstractSmtpTransport.php:422 Stack trace: #0 /web/htdocs/www.motoclub.bergamo.it/home/3m/_lib/prod/third/swift/classes/Swift/Transport/AbstractSmtpTransport.php(306): Swift_Transport_AbstractSmtpTransport->_assertResponseCode(‘452 4.1.0 4YXB1…’, Array) #1 /web/htdocs/www.motoclub.bergamo.it/home/3m/_lib/prod/third/swift/classes/Swift/Transport/EsmtpTransport.php(224): Swift_Transport_AbstractSmtpTransport->executeCommand(‘MAIL FROM: <soc…’, Array, Array) #2 /web/htdocs/www.motoclub.bergamo.it/home/3m/_lib/prod/third/swift/classes/Swift/Transport/EsmtpTransport.php(323): Swift_Transport_EsmtpTransport->executeCommand(‘MAIL FROM: <soc…’, Array) #3 /web/htdocs/www.motoclub.bergamo.it/home/3m/_lib/prod/third/swift in/web/htdocs/www.motoclub.bergamo.it/home/3m/_lib/prod/third/swift/classes/Swift/Transport/AbstractSmtpTransport.php on line 422

AFAIK this is not due to a failing email address but due to you sending too many messages that your provider supports. Bulk emails are oftenly not allowed unless you have a separate contract with your provider to prevent the server ending up in a spamblocker which would affect all users not being able to send any more emails. So I recommend sending your emails in blocks allowing enough time to prevent you being excluded. I once got my webhosting package suspended because of this…

Hi,
thanks

there are two separate problems.
One is about a wrong address into list that makes stopping the e_mail sending. How can avoid that the sending would be blocked ?

The other one is about storage .
How can I automate in SC the block sending of emails related to time needed in order to avoid the blocking of email sending ?

Sorry I forgot another question,

is it possile to send more than one attachment in a single mail sending ?

Ex. 1:
sc_mail_send(‘smtp.meuserver.com.br’, ‘usr’, ‘pw’, ‘from@netmake.com.br’, ‘to@netmake.com.br’, ‘Test Email Subject’, ‘Message’, ‘H’, ‘abc@cop.com.br;zxy@cop.com.br’, ‘H’, ‘’, ‘’, ‘c:/test/arq.txt’);

here it seems only one

At your additional question, I don’t know, I would add a second file separated by a ; and see what it does. A wrong address can be several thing: wrong formatted or non existent. In the latest situation you can send you mail but you will get some replymail telling that the email address doesn’t excists. Not sure if it works, but you can always try a ‘try … catch’ statement and see if the error is trapped. If it doesn’t you might have to use a blank application to send the mails and use the php functions for that. Loads of samples on the web. Regarding the delay, I would first read next: http://stackoverflow.com/questions/1118154/sending-mass-email-using-php. There’s a php sleep method to ensure enough time. Again, I don’t know the amount of emails you need to send, but there’s a huge chance that your email will be banned.