i have a problem with swiftmailer?

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
ejiro2x
Forum Newbie
Posts: 22
Joined: Thu Apr 19, 2007 7:48 am

i have a problem with swiftmailer?

Post by ejiro2x »

JayBird | 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]


i uploaded it on  a free webhost and i cant locate the user end.below is how it came out in the test configuration script.and please can you enlighten me on how to use it.

Code: Select all

<?php

define("TEST_CONFIG_PATH", dirname(__FILE__));
define("DEFAULT_WRITABLE_PATH", TEST_CONFIG_PATH . "/tmp");
define("DEFAULT_LIBRARY_PATH", TEST_CONFIG_PATH . "/../lib");

/**
 * Adjust the values contained inside this class in order to run the tests
 * NOTE: SimpleTest is NOT provided with Swift.  You must download this from SouceForge yourself.
 * Paths given should be either relative to the "tests/units" directory or absolute.
 * @package Swift_Tests
 * @author Chris Corbyn <chris@w3style.co.uk>
 */
class TestConfiguration
{
  /**
   * Somewhere to write to when testing disk cache
   */
  var $WRITABLE_PATH = DEFAULT_WRITABLE_PATH;
  /**
   * The location of SimpleTest (Unit Test Tool)
   */
  var $SIMPLETEST_PATH = "/Users/d11wtq/simpletest";
  /**
   * The location of the Swift library directory
   */
  var $SWIFT_LIBRARY_PATH = DEFAULT_LIBRARY_PATH;
  
  /*
   * EVERYTHING BELOW IS FOR SMOKE TESTING ONLY
   */
   
  /**
   * The connection tye to use in testing
   * "smtp", "sendmail" or "nativemail"
   */
  var $CONNECTION_TYPE = "smtp";
  /**
   * An address to send emails from
   */
  var $FROM_ADDRESS = "chris@w3style.co.uk";
  /**
   * The name of the sender
   */
  var $FROM_NAME = "Chris Corbyn - from";
  /**
   * An address to send emails to
   */
  var $TO_ADDRESS = "chris@w3style.co.uk";
  /**
   * The name of the recipient
   */
  var $TO_NAME = "Chris Corbyn - to";
  
  /*
   * SMTP SETTINGS - IF APPLICABLE
   */
   
  /**
   * The FQDN of the host
   */
  var $SMTP_HOST = "smtp.swiftmailer.org";
  /**
   * The remote port of the SMTP server
   */
  var $SMTP_PORT = 25;
  /**
   * Encryption to use if any
   * "ssl", "tls" or false
   */
  var $SMTP_ENCRYPTION = false;
  /**
   * A username for SMTP, if any
   */
  var $SMTP_USER = false;
  /**
   * Password for SMTP, if any
   */
  var $SMTP_PASS = false;
  
  /*
   * SENDMAIL BINARY SETTINGS - IF APPLICABLE
   */
  
  /**
   * The path to sendmail, including the -bs options
   */
  var $SENDMAIL_PATH = "/usr/sbin/sendmail -bs";
}

$GLOBALS["CONF"] = new TestConfiguration();
[/syntax]


JayBird | 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 »

I'm not sure I understand what you're asking sorry. What do you mean by "can't locate the user end" ? Do you mean a front-end? Swift doesn't have a front-end, that's not what it's for.
ejiro2x
Forum Newbie
Posts: 22
Joined: Thu Apr 19, 2007 7:48 am

Post by ejiro2x »

am confused ,which line am i meant to edit,please
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Ah ok, first you need to understand that this file is only for testing. You do not need this file in order to just make use of Swift. It's part of the development stuff for unit testers really. Everything you edit here has no bearing on the library itself, but either way:

You (probably) want to leave CONNECTION_TYPE as smtp
FROM_ADDRESS is just an email address you're allowed to send from
FROM_NAME is completely optional... it's just your name
TO_ADDRESS and TO_NAME are set just like their FROM_* counterparts. I tend to just use the same address. It's where the smoke tests will send emails to... so you need to have access to the email account ;)
SMTP_HOST will need to be changed to your smtp server address
SMTP_PORT, SMTP_USER, SMTP_PASS and SMTP_ENCRYPTION can probably be left unchanged and you'd likely know what should be put there if they did need changing.
SENDMAIL_PATH is likely irrelevant, assuming you're using SMTP.

If you're not comfortable with unit testing then just skip this entire part of the documentation...
Post Reply