SwiftMailer crashes IIS SMTP

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
hamptonk
Forum Newbie
Posts: 4
Joined: Thu Oct 05, 2006 1:16 pm

SwiftMailer crashes IIS SMTP

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Is there a more detailed message in the server's event log?
hamptonk
Forum Newbie
Posts: 4
Joined: Thu Oct 05, 2006 1:16 pm

Post 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?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

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

Post 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?
hamptonk
Forum Newbie
Posts: 4
Joined: Thu Oct 05, 2006 1:16 pm

Post 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]
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Looks fine. I'd probably try upgrading PHP. Whatever the code, PHP should never crash IIS.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Try downgrading PHP to 5.1.4 and trying again.
hamptonk
Forum Newbie
Posts: 4
Joined: Thu Oct 05, 2006 1:16 pm

Post 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?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

moved to Swift
Post Reply