Test works but not script!????

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
teebo
Forum Newbie
Posts: 1
Joined: Thu Apr 19, 2007 1:20 pm

Test works but not script!????

Post by teebo »

Hi everyone,

I installed Swift and ran the Smoke test and it worked perfectly.
But the scripts I try do not!

Here is one example that is not working and giving me NO ERRORS:

Code: Select all

ini_set('display_errors', '1');
error_reporting(E_ALL); 
        
require("mailIT/Swift.php"));
require("mailIT/Swift/Connection/SMTP.php");


//Start Swift
$smtp =& new Swift_Connection_SMTP("smtp.domain.com");
$smtp->setUsername("USER");
$smtp->setPassword("PWD");

$swift =& new Swift($smtp); 
 
$message =& new Swift_Message("Some subject", "Your message <u>here</u>", "text/html");
 
if ($swift->send($message, "email@email.com", "email@email.com"))
{
    echo "Message sent";
}
else
{
    echo "Message failed to send";
}

How can I find out what is going on?

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

Post by Chris Corbyn »

You have a syntax error in your file. Hint, your first "require())" ;)
Post Reply