Trying to use swiftmailer but get an error!?

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
Viperia
Forum Newbie
Posts: 2
Joined: Thu Dec 07, 2006 2:50 am

Trying to use swiftmailer but get an error!?

Post by Viperia »

Hello,

I have a small problem i downloaded the last swiftmailer and copyed it to my webserver etc. I changed a little in the /docs/examples/ files to try my smtp but i get an error saying "Parse error: parse error, unexpected T_STRING in /var/www/web1/web/Swift.php on line 70" and i cant get anything to work as it should.

Anyone have a clue why i get this? Line 70 contains the following: interface Swift_IPlugin

Hope someone can help me fast!

Regards,
Viperia
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

Could you please post the whole php code inside

Code: Select all

code brakets? Showing just 1 line of code shows us nothing. The error could be just before and just after line 70.
Viperia
Forum Newbie
Posts: 2
Joined: Thu Dec 07, 2006 2:50 am

Post by Viperia »

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]


[quote="Zoxive"]Could you please post the whole php code inside

Code: Select all

code brakets? Showing just 1 line of code shows us nothing. The error could be just before and just after line 70.[/quote]
Well if you have swiftmailer files you could just open the Swift.php file and check your self but i will post a couple of lines extra then. 

[php]
if (!defined('SWIFT_VERSION')) define('SWIFT_VERSION', '2.1.17');

/**
 * Swift Plugin Interface. Describes the methods which plugins should implement
 * @package Swift
 */
interface Swift_IPlugin
{
	/**
	 * Required Properties
	 *
	 * private SwiftInstance;
	 * public pluginName;
	 */
	
	/**
	 * Loads an instance of Swift to the Plugin
	 * @param  object  SwiftInstance
	 * @return  void
	 */
	public function loadBaseObject(&$object);

[/php]

Take notice that i have not edited this file at all so it is the original file that came in Swift-2.1.17.zip from the download page.

Regards,
Viperia


[color=red][b]feyd[/b] | 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]
jbh
Forum Commoner
Posts: 89
Joined: Tue Dec 05, 2006 7:01 pm

Post by jbh »

I went through that. I downloaded that zip and the same thing happened. It was because I have php 4 and that is for php 5

The zip file that has php 4 at the end of it is the one for php 4 servers.

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

Post by Chris Corbyn »

jbh wrote:I went through that. I downloaded that zip and the same thing happened. It was because I have php 4 and that is for php 5

The zip file that has php 4 at the end of it is the one for php 4 servers.

Check that.
Correct :)

I'm gonna start sticking -php5 in the PHP5 versions too.
Post Reply