Page 1 of 1

SwiftMailer crashes IIS SMTP

Posted: Thu Oct 05, 2006 1:28 pm
by hamptonk
I have the same code running on a linux, bsd and windows box and sending mail with the normal mail() function just doesn't seem to work on windows very well, so I thought Swift might solve the problem.

I just installed swift mailer on my laptop (xp pro) where i have WAMP running and do development
and i have IIS installed - smtp is on, but iis web server off

I ran the swift test page

it sends the email just fine, but i get a window that pops up saying that the IIS has encountered a problem and needs to close

anybody know what might be causing this?

Also, is it ok to just use localhost as the smtp server?
It would certainly make it easier to maintain the code on multiple machines

thanks

hampton

Posted: Thu Oct 05, 2006 1:30 pm
by volka
Is there a more detailed message in the server's event log?

Posted: Thu Oct 05, 2006 1:35 pm
by hamptonk
Event Viewer - Application Error:
Faulting application inetinfo.exe, version 5.1.2600.2180, faulting module unknown, version 0.0.0.0, fault address 0x00000290.

incidently - the smtp server keeps running

i think it is the mmc control thing that is acting up?

Posted: Thu Oct 05, 2006 1:44 pm
by volka

Posted: Thu Oct 05, 2006 2:18 pm
by Chris Corbyn
Hmm... this is a server issue. What does the code look like? What version of PHP are you running and what version of Swift?

Posted: Thu Oct 05, 2006 2:55 pm
by hamptonk
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


PHP Version 5.1.6

just downloaded swift today 2.1.16


just used the test page that came with swift and put in my info

Code: Select all

<?php

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

$mailer = new Swift(new Swift_Connection_SMTP('localhost'));

if ($mailer->isConnected()) //Optional
{
	//Sends a simple email
	$mailer->send(
		'"To" <hampton@mydomain.com>', //used real domain
		'"From" <hampton@mydomain.org>',//used real domain
		'Some Subject',
		'Message here'
	);
	//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>";

?>

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Thu Oct 05, 2006 4:22 pm
by Chris Corbyn
Looks fine. I'd probably try upgrading PHP. Whatever the code, PHP should never crash IIS.

Posted: Thu Oct 05, 2006 6:52 pm
by Ambush Commander
Try downgrading PHP to 5.1.4 and trying again.

Posted: Fri Oct 06, 2006 10:28 am
by hamptonk
well, i thought i'd just go ahead and try it on my live 2003 windows server which is running php 5.05 and IIS

i run the basic_smtp.php file and get nothing
no errors, no emails sent, nothing in the smtp logs

man - i hate php on windows!

any ideas?

Posted: Fri Oct 06, 2006 10:30 am
by Burrito
moved to Swift