Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1

    Default paano po mag gamit ng mail() function PHP?


    may lumalabas po na Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\source_files\index.php on line 64

    basta ganun po... paanu ko po xa maayos??
    tnx
    newbie palang po ako sa php...

  2. #2
    kinda need an expert for this one...

    im a newbie sa programming pud.. PHP sad ako tun-an ron.

  3. #3
    Look for the lines below in your php.ini, then next to that line you set your smtp server and port.

    [mail function]
    ; For Win32 only.

  4. #4
    Look for the lines below in your php.ini, then next to that line you set your smtp server and port.

    [mail function]
    ; For Win32 only.

  5. #5
    You can do one of these 3

    1. Run an SMTP server on your local machine
    2. Change the host setting of your SMTP configuration inside php.ini
    3. Dynamically set it with ini_set() e.g. ini_set("SMTP","some.mailserver.com");

  6. #6
    try mo if you have valid entry for the SMPT server/address.

    If you can't use or don't understand how to use the sendmail program from linux, you can use a PEAR object to send mail.

    <?php
    include("Mail.php");

    $recipients = "mailto@example.com";

    $headers["From"] = "mailfrom@example.com";
    $headers["To"] = "mailto@example.com";
    $headers["Subject"] = "Test message";

    $body = "TEST MESSAGE!!!";

    $params["host"] = "example.com";
    $params["port"] = "25";
    $params["auth"] = true;
    $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);
    ?>

    In my case, i use a smtp server that require authentication, and sendmail configuration is almost cryptic to me.

    PEAR is already installed in PHP 4.0.3 , if not, you must go to PEAR - PHP Extension and Application Repository and install it, in my case, I needed to add the Socket.php to the PEAR library.

  7. #7
    you can use phpmailer.

  8. #8
    unsa pud na ang phpmailer?

  9. #9
    phpmailer same configuration with michaelocana post. download at sourceforge PHPMailer | Get PHPMailer at SourceForge.net
    google a little how to use.

  10. #10
    if you have a mail server run your mail server before you can use the mail function but instead use admin@localhost since you are only using a localhost server.

    Or try to find some free hosting and then you don't have nothing to configure the mail. though some host has disable the mail function to avoid spam

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. Paano Mag-Invite Ng Prospects Sa Network Marketing Business Mo: Indirect Approach
    By maricelineq in forum Business, Finance & Economics Discussions
    Replies: 0
    Last Post: 06-03-2013, 01:02 PM
  2. mga brad alam nyo ba kong paano mag open ng GPRS?
    By jeu06 in forum Networking & Internet
    Replies: 2
    Last Post: 06-10-2012, 12:25 PM
  3. Ano Po ang gamit sa pa bilis ng computer sa gaming...?
    By sirob2007 in forum Computer Hardware
    Replies: 5
    Last Post: 02-17-2007, 10:40 PM
  4. Replies: 10
    Last Post: 01-07-2007, 05:34 PM
  5. san pwde mag download ng infrared...
    By milkyshake in forum Websites & Multimedia
    Replies: 14
    Last Post: 05-31-2005, 04:48 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top