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

Post by webstyler »

d11wtq wrote: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.
we have used Swift x 2 project but we are been develop other with custom smtp system :)

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

Post by webstyler »

d11wtq wrote: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?)

we have used swift on 1 project of mailing and we are been writing own mailer for custom solution..

(why ?)
d11wtq wrote:Check the RFCs. That's what RFCs were written for.
we check tx
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I'm not sure if you're aware, but with Swift Mailer, you can write event listeners which can send SMTP commands and read parsed responses.


Tutorials for Writing Plugins: Running a command is as easy as:

Code: Select all

//Get the response for the command FOO
$response = $swift->command("FOO");
//Get the response for the command FOO and throw an error is 250 is not the response code
$response = $swift->command("FOO", 250);

//Echo the respose
echo $response->getString();
//Echo the response code
echo $response->getCode();
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

d11wtq wrote:Check the RFCs. That's what RFCs were written for.
Ok, I have found this code

This can be start with 4 or 5

X.1.0 Other address status
X.1.1 Bad destination mailbox address
X.2.0 Bad destination system address
X.1.3 Bad destination mailbox address syntax
X.1.4 Destination mailbox address ambiguous
X.1.5 Destination mailbox address valid
X.1.6 Mailbox has moved
X.1.7 Bad sender's mailbox address syntax
X.1.8 Bad sender's system address
X.2.0 Other or undefined mailbox status
X.2.1 Mailbox disabled, not accepting messages
X.2.2 Mailbox full
X.2.3 Message length exceeds administrative limit.
X.2.4 Mailing list expansion problem
X.3.0 Other or undefined mail system status
X.3.1 Mail system full
X.3.2 System not accepting network messages
X.3.3 System not capable of selected features
X.3.4 Message too big for system
X.4.0 Other or undefined network or routing status
X.4.1 No answer from host
X.4.2 Bad connection
X.4.3 Routing server failure
X.4.4 Unable to route
X.4.5 Network congestion
X.4.6 Routing loop detected
X.4.7 Delivery time expired
X.5.0 Other or undefined protocol status
X.5.1 Invalid command
X.5.2 Syntax error
X.5.3 Too many recipients
X.5.4 Invalid command arguments
X.5.5 Wrong protocol version
X.6.0 Other or undefined media error
X.6.1 Media not supported
X.6.2 Conversion required and prohibited
X.6.3 Conversion required but not supported
X.6.4 Conversion with loss performed
X.6.5 Conversion failed
X.7.0 Other or undefined security status
X.7.1 Delivery not authorized, message refused
X.7.2 Mailing list expansion prohibited
X.7.3 Security conversion required but not possible
X.7.4 Security features not supported
X.7.5 Cryptographic failure
X.7.6 Cryptographic algorithm not supported
X.7.7 Message integrity failure

BUT.. not all emails bounce contain error 'codes' but only error text..

Can be right to check only for "error text" in email bounce message ?

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

Post by Chris Corbyn »

All bounce messages vary depending upon the MTA. I did my own study a while back for a freelance client at the time. I don't have ti to hand, but get a test server set up and fires messages at it which will bounce.
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

d11wtq wrote:All bounce messages vary depending upon the MTA. I did my own study a while back for a freelance client at the time. I don't have ti to hand, but get a test server set up and fires messages at it which will bounce.
:) tx

I'm testing bounce email and only the 5% have code as x.x.x.

For this I think is better to search in the message NOT the error code but error text as:
User unknown
Mailbox disk quota exceeded
Mailbox disabled for this recipient
Recipient address rejected: Account Closed
unrouteable mail domain
this account has been disabled or discontinued
The recipient cannot be verified
retry timeout exceeded

Do you think right this ?

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

Post by Chris Corbyn »

In the past I have just parsed the messages yes.
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

webstyler wrote: 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
I add note, think useful

After more test think is better group BUT for little number of ISP as 100 max emails

In our test more ISP block x 1 hour our IP after 100/200 emails direct to they in one single smtp connection.

Bye
Post Reply