Results 1 to 2 of 2

Thread: Creating mail object using Mail::factory ("smtp", ....) and FormMail

  1. #1
    Join Date
    Jul 2004
    Posts
    1

    Default Creating mail object using Mail::factory ("smtp", ....) and FormMail

    My domain host has changed its pHp mail handling to use an SMTP server - see below.

    I was hoping to use FormMail, but note that is does not (I think) suppor tthis configuration. Is there a permitted modification to the function SendCheckedMail() that I can use - if so, can anybody help, and are we permitted to modify the script??

    In hopeful anticipation

    *********************************************************


    <?
    include("Mail.php");

    $recipients = "mail_to@domain.mail";

    $headers["From"] = "mail_from@domain.mail";
    $headers["To"] = "mail_to@domain.mail";
    $headers["Subject"] = "Test message";

    $body = "TEST MESSAGE!!!";

    $params["host"] = "10.14.0.16";
    $params["port"] = "25";
    $params["auth"] = false;
    $params["username"] = "user";
    $params["password"] = "password";

    // Create the mail object using the Mail::factory method
    $mail_object =& Mail::factory("smtp", $params);

    $mail_object->send($recipients, $headers, $body);
    ?>

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Creating mail object using Mail::factory ("smtp", ....) and FormMail

    Hi,

    Yes, you're welcome to modify our FormMail to suit your needs (but please note the conditions listed at the top of the file regarding modification and distribution).

    However, if you do modify it then it will make it much harder for you to upgrade to later versions.

    Your hosting provider has asked you to use a PEAR module. Since this is becoming a standard feature of PHP, we're happy to add this as an option to FormMail.

    This means you'll be able to enable it with a simple configuration option and future upgrading will be easy (esp. through the Upgrade Wizard).
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mail Trouble
    By madref in forum FormMail Subscription Support
    Replies: 3
    Last Post: 30-Mar-2004, 10:15 PM
  2. at mangle / e-mail question
    By Ibis in forum FormMail Subscription Support
    Replies: 3
    Last Post: 25-Feb-2004, 02:59 AM
  3. Does your web server send mail?
    By russellr in forum FormMail Subscription Support
    Replies: 0
    Last Post: 10-Feb-2004, 08:19 AM
  4. Form Mail Questions
    By Ramius in forum FormMail Subscription Support
    Replies: 5
    Last Post: 12-Jan-2004, 03:22 AM
  5. Formmail works fine, but no e-mail
    By Wiggy in forum FormMail Subscription Support
    Replies: 1
    Last Post: 08-Jan-2004, 04:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •