Page 3 of 5

Posted: Wed Aug 09, 2006 1:01 pm
by alexus
OMG...
Another problem aaa 3 days for one mailing thing and it still aint workingg grrrr


ok so what you mean is that port 465? if I froce them to update firewall will that work?

Posted: Wed Aug 09, 2006 1:12 pm
by Chris Corbyn
alexus wrote:OMG...
Another problem aaa 3 days for one mailing thing and it still aint workingg grrrr


ok so what you mean is that port 465? if I froce them to update firewall will that work?
Should do... see if your host will do that for you :)

Posted: Wed Aug 09, 2006 1:25 pm
by alexus
well they just told me that if i buy an IP from them they will set up it on SMPT,
and if I want to heve outgoing traffic I need to buy IP too... if I want use Gmail SMTP buy IP .... just like a mafia lol

extortion all over the place

Posted: Wed Aug 09, 2006 1:31 pm
by Chris Corbyn
alexus wrote:well they just told me that if i buy an IP from them they will set up it on SMPT,
and if I want to heve outgoing traffic I need to buy IP too... if I want use Gmail SMTP buy IP .... just like a mafia lol

extortion all over the place
So basically you need a VPS? Is that what they're trying to sell you? Not much point in having an IP if everyone else can use the same IP.

Posted: Wed Aug 09, 2006 1:33 pm
by alexus
well demending how to define Virtual and Private...
they just will assing an IP to my HTTP derictory I think

Posted: Sat Aug 12, 2006 10:18 pm
by alexus
ok I finally got it working with hotmail... now I send mail through gmail
but I never got any emails to any of my test emails on difereent servers...
Also gmail returned some failure notice.... which for some reason had all email DB listed in the header... I suume that anti flood is not working becaus ethere shouldnt be all emaile there should be just 100 emails max + the shouldn be shown at all i think?

What is going on? Why can I debug? Everythin works fine with small testing sample. I can really send to many things out because if for some reason lt say even 40% of peaple getting the mail but 60% and if they gat to many test emails? I cant loos me visitors?

How can I debug in this situation?

Posted: Sun Aug 13, 2006 4:02 am
by Chris Corbyn
Can you post or PM me your code please? :)

Posted: Sun Aug 13, 2006 11:54 am
by alexus
Ok I just sent you PM with exact code of my page :-)

Posted: Tue Aug 22, 2006 2:13 pm
by alexus
Ok my SMTP just technicaly fixed the Hotmail problem but still I have some problems with delivery

a) I found out thta my server has 50 email per hour, (but they increased to 500, I hope)

Never the less I'm getting fine only first 41 messsges and them nothing, only returned mail that some mailbozes do not exist...

So, how can I deas with this... can I have this type of output:

1-In realtime output show emails that are sent and confirmed my SMTP
2- At the end show all bad emails that do not exist...

i tried get_failed recipients, but it doesnt return anything ... this is 2nd week and im alredu too furstrated

Posted: Tue Aug 22, 2006 3:14 pm
by Chris Corbyn
alexus wrote:Ok my SMTP just technicaly fixed the Hotmail problem but still I have some problems with delivery

a) I found out thta my server has 50 email per hour, (but they increased to 500, I hope)

Never the less I'm getting fine only first 41 messsges and them nothing, only returned mail that some mailbozes do not exist...

So, how can I deas with this... can I have this type of output:

1-In realtime output show emails that are sent and confirmed my SMTP
2- At the end show all bad emails that do not exist...

i tried get_failed recipients, but it doesnt return anything ... this is 2nd week and im alredu too furstrated
Sounds like you were getting "1" for the array getFailedRecipients() because you were doing something like:

Code: Select all

echo print_r($swift->getFailedRecipients());
Rather than just:

Code: Select all

print_r($swift->getFailedRecipients());
The other problems have nothing to do with Swift, if the email reaches the SMTP server in order for it to even return a "failed" message Swift cannot do anything else. Swift's job is to deliver mail to your SMTP server, not to travel around the internet delivering messages to each individual recipient. How long agao did your host increase the limit?

As for showing output in realtime, if you have time to wait then this should work (untested):

Code: Select all

<?php

class Swift_Plugin_VerboseSending implements Swift_IPlugin
{
	private $swift;
	
	public function loadBaseObject(&$swift)
	{
		$this->swift =& $swift;
	}
	
	public function onSend()
	{
		$recipients = array();
		foreach ((array) $this->swift->currentMail[1] as $address)
		{
			$recipients[] = $this->swift->getAddress($address);
		}
		$recipient_concat = implode(', ', $recipients);
		echo "<div style="background: #44cc44; color: #ffffff; margin: 2px;">Mail Sent to $recipient_concat</div><br />";
		ob_flush(); flush();
	}
}

?>
Sorry, I forget if you're using PHP4 or 5. The PHP4 version would be:

Code: Select all

<?php

class Swift_Plugin_VerboseSending
{
	var $swift;
	
	function loadBaseObject(&$swift)
	{
		$this->swift =& $swift;
	}
	
	function onSend()
	{
		$recipients = array();
		foreach ((array) $this->swift->currentMail[1] as $address)
		{
			$recipients[] = $this->swift->getAddress($address);
		}
		$recipient_concat = implode(', ', $recipients);
		echo "<div style="background: #44cc44; color: #ffffff; margin: 2px;">Mail Sent to: $recipient_concat</div><br />";
		ob_flush(); flush();
	}
}

?>
Seriously, if green bars are output with a list of recipients Swift has done as much as it can for those recipients ;)

EDIT | Fixed </span> to </div>

Posted: Tue Aug 22, 2006 3:27 pm
by Chris Corbyn
Sorry, above plugin just got tested (I'm bored :P) but this works:

Code: Select all

<?php

class Swift_Plugin_VerboseSending implements Swift_IPlugin
{
	private $swift;
	public $pluginName = 'Verbose';
	
	public function loadBaseObject(&$swift)
	{
		$this->swift =& $swift;
	}
	
	public function onSend()
	{
		$recipients = array();
		foreach ((array) $this->swift->currentMail[1] as $address)
		{$this->swift->currentMail[1];
			$recipients[] = substr($this->swift->getAddress($address), 1, -1);
		}
		$recipient_concat = implode(', ', $recipients);
		echo "<div style=\"background: #44cc44; color: #ffffff; margin: 2px;\">Mail Sent to $recipient_concat</div>\n";
		flush();
	}
}

?>
Or PHP4:

Code: Select all

<?php

class Swift_Plugin_VerboseSending
{
	var $swift;
	var $pluginName = 'Verbose';
	
	function loadBaseObject(&$swift)
	{
		$this->swift =& $swift;
	}
	
	function onSend()
	{
		$recipients = array();
		foreach ((array) $this->swift->currentMail[1] as $address)
		{$this->swift->currentMail[1];
			$recipients[] = substr($this->swift->getAddress($address), 1, -1);
		}
		$recipient_concat = implode(', ', $recipients);
		echo "<div style=\"background: #44cc44; color: #ffffff; margin: 2px;\">Mail Sent to $recipient_concat</div>\n";
		flush();
	}
}

?>
Each email sent, blinks a green bar onto a list in realtime. I guess the flush() call will vary depending upon your server but in most cases it will work.

EDIT | Oh, you got me started now ;) I like this plugin system, I can play forever. This one does an output like this:

Image

PHP5:

Code: Select all

<?php

class Swift_Plugin_VerboseSending implements Swift_IPlugin
{
	private $swift;
	public $pluginName = 'Verbose';
	private $count = 0;
	
	public function loadBaseObject(&$swift)
	{
		$this->swift =& $swift;
	}
	
	public function onSend()
	{
		$recipients = array();
		foreach ((array) $this->swift->currentMail[1] as $address)
		{
			$this->count++;
			$sent_to = $this->swift->getAddress($address);
			$result = array();
			$result[] = substr($sent_to, 1, -1);
			if (in_array($sent_to, $this->swift->getFailedRecipients())) $result[] = false;
			else $result[] = true;
			
			switch ($result[1])
			{
				case true:
				$pass = 'OK';
				$color = '#44aa44';
				break;
				case false:
				$pass = 'FAIL';
				$color = '#bb4444';
				break;
			}
			
			echo "<div style=\"
			background: $color;
			color: #ffffff;
			margin: 2px;
			padding: 3px;
			font-weight: bold;\">
			<span style=\"float: right;
			text-decoration: underline;\">$pass</span>
			Recipient ($this->count): $result[0]</div>\n";
			flush();
		}
	}
}

?>
or PHP4:

Code: Select all

<?php

class Swift_Plugin_VerboseSending
{
	var $swift;
	var $pluginName = 'Verbose';
	var $count = 0;
	
	function loadBaseObject(&$swift)
	{
		$this->swift =& $swift;
	}
	
	function onSend()
	{
		$recipients = array();
		foreach ((array) $this->swift->currentMail[1] as $address)
		{
			$this->count++;
			$sent_to = $this->swift->getAddress($address);
			$result = array();
			$result[] = substr($sent_to, 1, -1);
			if (in_array($sent_to, $this->swift->getFailedRecipients())) $result[] = false;
			else $result[] = true;
			
			switch ($result[1])
			{
				case true:
				$pass = 'OK';
				$color = '#44aa44';
				break;
				case false:
				$pass = 'FAIL';
				$color = '#bb4444';
				break;
			}
			
			echo "<div style=\"
			background: $color;
			color: #ffffff;
			margin: 2px;
			padding: 3px;
			font-weight: bold;\">
			<span style=\"float: right;
			text-decoration: underline;\">$pass</span>
			Recipient ($this->count): $result[0]</div>\n";
			flush();
		}
	}
}

?>

Posted: Thu Aug 31, 2006 5:58 pm
by alexus
Hey thatsnks for the plugin, for some reason I didnt get notification about your new post :-( I' will try it now...


Still I just foun out strange problem (again) when im sending HTML w/ image <img src=http://abc.com> the image is showing as an error image? why? is thta only me as usual?

PS: I'm using PHP4

Posted: Thu Aug 31, 2006 6:15 pm
by alexus
hey plugin works :-) THANKS!

Now one thing left fix sending image... well and my hotmail thing (my SMTP was removed from the blaclkist) at least on the link you gave me but mail is not delivered to hatmail

Posted: Thu Aug 31, 2006 6:23 pm
by alexus
ok here is my own findings on waht caused the images not to show up:

my html:

Code: Select all

<p>
<img src="http://www.ultraclubber.com/events/img_flyer_496.php?VAPOR%20WHITE%20back.jpg" border="0"></p>
Working HTML:

Code: Select all

<p>
<img src=http://www.ultraclubber.com/events/img_flyer_496.php?VAPOR%20WHITE%20back.jpg border=0></p>

Diferance? => Quatation marks withn the HTML tags

Question: How to remove quatation marks with HTML only?

Posted: Thu Aug 31, 2006 8:48 pm
by alexus
ok I just tried to remuve "double qutes" with $textbody = str_replace( '"', '_', $textbody );
but that didnt work :-( when I get the mail im getting

<img src=\lalala.jpg\ border=\0\ >

the places where we coldow have " have back slashed instead :-(