how to send 2300 emails without errors?

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

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

Post by Chris Corbyn »

alexus wrote:ok, when I outputed the failed addreeses it jyst gave me number "1" which is I assume 1 bad address or error, and it is probably my hotmail account that for soeme rasont doesnt get the maill I send from SWIFT, but works just fine with the same SMPT account. a)Why that happence and gow can I debug? I dont want to loose all hotmail accounts thats about 500 ppl in my database

Thanks!
getFailedRecipients() an array of addresses. How did you output it?

The hotmail thing sounds like it's being blocked as spam. Have you tried sending *exactly* the same email from your host through the same SMTP server? Not from your own machine, it needs to originate at the same location as where swift is installed so you can see if it's blacklisting your IP ;)
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

i outputed the function at the end of the script just the way u gave me...

as to the hotmail, would the test rowk if I send mail via SquirleMail?
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

OMG!
just tried to send mail via SquirelMail on the host and it didnt reach the hotmail either :-(
How do I deal with that?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

alexus wrote:OMG!
just tried to send mail via SquirelMail on the host and it didnt reach the hotmail either :-(
How do I deal with that?
Send the same email to chris@w3style.co.uk and I'll give you some info on the SPAM score it gets.
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

ok njust sent email
subject "hotmail test"
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

SA is marking you down for not giving a real name in the From address.

i.e. your@address.com rather than "Your Name" <your@address.com>

FYI, the short message "test" will usually be penalized too.... you should test with longer messages. If you don't want to type out a long message use lipsum.com to generate some arbitrary text ;)

The outgoing SMTP server is in at least one RBL (Realtime Black List) bl.spamcannibal.org.

http://www.robtex.com/rbls/67.138.240.198.html

Apart from that everything looks good. It could be borderline. Try a longer message and give a name in the "From: " field. If hotmail is paying attention strictly to RBLs you can't really do a lot. It's extremely difficult to get your IP taken off a blacklist.
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

Ok, I just tried to set my name and email address for headers, aslo used fake latin poems as body of the mesage. but no luck :-(
Hotmail doesnt let it through..

What I have to change the host again? AAAAAA thats 3rd time in one month
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

alexus wrote:Ok, I just tried to set my name and email address for headers, aslo used fake latin poems as body of the mesage. but no luck :-(
Hotmail doesnt let it through..

What I have to change the host again? AAAAAA thats 3rd time in one month
Shared host servers are notoriously bad for being blacklisted. Especially the cheaper ones since they do tend to attract spammers. It only takes one person on that server to start sending spam and you'll finish up being penalized for it. VDS/VPS is the way to go if you want cheap hosting without the hassle of other users sharing the same environment ;)
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

aaaa, im having a heart attack...
I can run my own datasener, I just dont wana have that much pain in the a** to maitain it, but now Im having same amout of trouble...

I first host was perfect! no problems whatsoever before their DB gots corupted and didnt accept 2d requests. :-(
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Hehe it' all fun fun fun. I was about to sell myself by saying if you got a VDS and couldn't be bothered/didn't have time to set it up as a mail/http server I'd do it for a small sum but you sound like you're capable of that anyway :)
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

ya setting up mail and apache is easy...designing custom equipment is easy too.... keeping up with all updates, patches remakes, erc thats hard, I have to be in hosting business to know all the stuff like that... and IU dont mean install everything that was released... caz in most cases thats just slows down the system and sometimes even kills it => FedoraCore 3 upgrade he he

well what im gonna do i guess is setup Gmail account for newsletter, not as good as sending tem from our domain name but at least that might deliver tham

and i have to fix that problem wih printing andelivarable email
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

alexus wrote:ya setting up mail and apache is easy...designing custom equipment is easy too.... keeping up with all updates, patches remakes, erc thats hard, I have to be in hosting business to know all the stuff like that... and IU dont mean install everything that was released... caz in most cases thats just slows down the system and sometimes even kills it => FedoraCore 3 upgrade he he

well what im gonna do i guess is setup Gmail account for newsletter, not as good as sending tem from our domain name but at least that might deliver tham

and i have to fix that problem wih printing andelivarable email
Thats what security mailing lists are for ;) Like GLSA :)
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

oh men I hate mailing lists, forums way better...
Im on 3 linux lists and imgetting like 100 new messages per day on each, guess what "Delete Alll" ... I juast can read all thatt things...


PS: I just tried to use regular mail() functioon and it works just fine with hotmail he he probably HTTP box is not black listed..

Can I set headers in SWIFT so I sebd mail from Gmail and users would think its my domain? like FROM: and Return-Path?
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

Since I dont have any options I decided to try Gmail but itrefuses connection! Why? Am i doing something wrong?

Code: Select all

<?php

require('../../Swift.php');
require('../../Swift/Connection/SMTP.php');

$mailer = new Swift(new Swift_Connection_SMTP('smtp.gmail.com', SWIFT_SECURE_PORT, SWIFT_TLS));

//If anything goes wrong you can see what happened in the logs
if ($mailer->isConnected()) //Optional
{
	//You can call authenticate() anywhere before calling send()
	if ($mailer->authenticate(xxx@gmail.com', 'xxxx'))
	{
		//Sends a simple email
		$mailer->send(
			'"Netu" <xxxx@xxxx>',
			'"Alexus" <xxxx@gmail.com>',
			'Hey do u seee this?',
			"Hello Joe it's only me!"
		);
	}
	else echo "Didn't authenticate to server";
	
	//Closes cleanly... works without this but it's not as polite.
	$mailer->close();
}
else echo "The mailer failed to connect. Errors: <pre>".print_r($mailer->errors, 1)."</pre><br />
	Log: <pre>".print_r($mailer->transactions, 1)."</pre>";

?>
ERROR:

Code: Select all

The mailer failed to connect. Errors: 
Array
(
    [0] => Array
        (
            [num] => 0
            [time] => 0.51106400 1155145012
            [message] => Connection to the given MTA failed. The Connection Interface said: Connection refused
        )

)


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

Post by Chris Corbyn »

Gmail is not refusing you... your host is. I'm liking the sound of your host :P

Actually, to be fair, quite a few shared hosts block outgoing traffic on certain ports.
Post Reply