Read smtp error for better mailing list script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Read smtp error for better mailing list script

Post by webstyler »

Hello

we have a php mailing list script that work fine

now, we would like add new function for get smtp error and take correctly action.

for example:
if error is "bad destination mailbox address" don't try again to sent
if error is "Mailbox full" try later.. after x hours..
...

what is best way to check error and made action ??

txx
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Store that information in a data file or table (in a database)?
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

feyd wrote:Store that information in a data file or table (in a database)?
table (mysql dbase)

:)
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

more about

Post by webstyler »

we think to make 2 controls:

first > with smtp check if email address is ok as this http://www.zend.com/zend/spotlight/ev12apr.php

we have customer that must sent 400k/500k emails so we can found system for check as smtp but without that process come dangerous for server..

we must also know how works with smtp.. if is possible to make one single connection and more checked for connection and how get result..

second > check emails error return to "-r" headers.


At this time we use mail() single for any email but there is a first control about error

:|

thx
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

For mass mailing, mail() is one of the worst choices. Look into a real mailing tool like Swift or phpMailer.
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

feyd wrote:For mass mailing, mail() is one of the worst choices. Look into a real mailing tool like Swift or phpMailer.
we use mail() with more control as max emails x minute, x hours, session delay, complex headers, ....

we know swiftmailer.. really fine.. but we need to better our script..

If is better to use SMTP also for send we can make it... but we need to develop on our script :)

tx
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

webstyler wrote:
feyd wrote:For mass mailing, mail() is one of the worst choices. Look into a real mailing tool like Swift or phpMailer.
we use mail() with more control as max emails x minute, x hours, session delay, complex headers, ....

we know swiftmailer.. really fine.. but we need to better our script..

If is better to use SMTP also for send we can make it... but we need to develop on our script :)

tx
Swift does use SMTP. It also has a command() method* if you need to run commands against the SMTP server. Perhaps this will save you some time compared with writing your own set of tools? If you need to run a command before each message is sent there's the BeforeCommand plugin event which invokes the onBeforeCommand() method in the plugin in version 2.

It also does header customization*, anti-flooding (i.e. max emails per-connection, wait for x mins after sending a batch) and reads SMTP errors.

What is it you're trying to do specifically?

*Some of this functionality has been improved in the forthcoming release
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

Hi d11wtq

we want make 2 controls:

first > with smtp check if email address is ok as this http://www.zend.com/zend/spotlight/ev12apr.php

we have customer that must sent 400k/500k emails so we can found system for check as smtp but without that process come dangerous for server..

we must return a smtp error, store in dbase and use it for get action (suspend emails, send later, ...)


second > check emails error return to "-r" headers as bounce and get action for bounce code/type.

All operations is store in a log under dbase..

thx
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

d11wtq wrote:
webstyler wrote:
feyd wrote:For mass mailing, mail() is one of the worst choices. Look into a real mailing tool like Swift or phpMailer.
we use mail() with more control as max emails x minute, x hours, session delay, complex headers, ....

we know swiftmailer.. really fine.. but we need to better our script..

If is better to use SMTP also for send we can make it... but we need to develop on our script :)

tx
Swift does use SMTP. It also has a command() method* if you need to run commands against the SMTP server. Perhaps this will save you some time compared with writing your own set of tools? If you need to run a command before each message is sent there's the BeforeCommand plugin event which invokes the onBeforeCommand() method in the plugin in version 2.

It also does header customization*, anti-flooding (i.e. max emails per-connection, wait for x mins after sending a batch) and reads SMTP errors.

What is it you're trying to do specifically?

*Some of this functionality has been improved in the forthcoming release

we don't have php5 on server
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Swift has PHP 4 versions available too.
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

feyd wrote:Swift has PHP 4 versions available too.
yes, sorry for mistake

we had test in the past and after unistalled :)

Now we have install last release x Php 4

--

But, think we need any help to clarify how and if smtp can work as our first post.

we have try to send bach email with swift mailer but no error reporting for email as texttext.com..

Think need only to setting any var..

But now I have a question: for manage errore is really necessary use smtp ?

we receive and process bounce emails and all error is reporting by bounce..

Is possible to get smtp error and use for better process ? How ??

thx for help
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

with d11wtq help I have now know how exactly smtp work

I have another question:
is better to delivery newsletter at rcpt stirring or grouping the emails ?

If for example there is a newsletter to send at 10.000 emails is better to group by @domain.com or strirring ?

think that stirring is best pratics to avoid our newsletter is tagged as spam

but grouping I 'think' smtp is more faster (or not?)

tx
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Sending many emails to the same domain in one session is faster yes. SMTP has special procedures for handling this.
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

can anyone help to found:

1. updated list of stmp comunication error (from php->local smtp)
2. updated list of stmp error on bounce emails

?

thxx
:)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

What for? I'm seriosuly confused what you're doing because it sounds as though you've been asking for advice on the SMTP protocol rather than Swift mailer and are now writing your own mailer using my advice? (am I mistaken?)

Check the RFCs. That's what RFCs were written for.
Post Reply