Page 1 of 1
EasySwift.php
Posted: Mon Jun 11, 2007 9:14 am
by cupaball
Okay, I know that I am noob but this thing is discouraging. I guess you have to know a little (really alot) about how to set up the test TestConfiguration.php to run the test. I gave up on that and tried to run EasySwift.php. Right out the gate I get
Code: Select all
Parse error: parse error, unexpected ')', expecting '(' in /home/content/m/a/l/malikhaynes/html/lib/EasySwift.php on line 18
So let the help begin.
All I wanted to do was send an html email to every in my MySQL database using php and I continue to fail miserably. (I've already tried phpmailer).
Posted: Mon Jun 11, 2007 9:24 am
by cupaball
then I tried to send an email and got
Code: Select all
Parse error: parse error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/content/m/a/l/malikhaynes/html/lib/Swift.php on line 35
here is the code from email (copy and paste from example)
Code: Select all
<?php
//Load in the files we'll need
require_once "lib/Swift.php";
require_once "lib/Swift/Connection/NativeMail.php";
$swift =& new Swift(new Swift_Connection_NativeMail("-f%s"));
//Create the message
$message =& new Swift_Message("My subject", "My body");
//Now check if Swift actually sends it
if ($swift->send($message, "foo@bar.tld", "mhaynes@aminahdesigns.com")) echo "Sent";
else echo "Failed";
?>
Posted: Mon Jun 11, 2007 9:35 am
by Chris Corbyn
You've got the PHP5 version when you need the PHP4 version

Posted: Mon Jun 11, 2007 4:25 pm
by cupaball
oh! Okay thanks.
Posted: Mon Jun 11, 2007 6:36 pm
by cupaball
I went back and got the files for php.
I can even get past running the test
error
Code: Select all
Warning: main(../lib/Swift/Swift.php): failed to open stream: No such file or directory in /home/content/m/a/l/malikhaynes/html/tests/smokes/components/Runner.php on line 7
Warning: main(../lib/Swift/Swift.php): failed to open stream: No such file or directory in /home/content/m/a/l/malikhaynes/html/tests/smokes/components/Runner.php on line 7
Fatal error: main(): Failed opening required '../lib/Swift/Swift.php' (include_path='.:/usr/local/lib/php') in /home/content/m/a/l/malikhaynes/html/tests/smokes/components/Runner.php on line 7