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

    Default TABANG! Emailing in PHP


    based sa akong na research, para mka send ka ug email sa PHP mu gamit ka sa mail() function.... and then comes along the SMTP problem...

    exception:
    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 E:\APPLICATIONS\xampp\htdocs\email\class.Email.php on line 332
    then naay nag ingon na para ma solve ni kay use these statement before using the mail() function:

    <?php

    $Name = "Da Duder"; //senders name
    $email = "email@adress.com"; //senders e-mail adress
    $recipient = "PersonWhoGetsIt@emailadress.com"; //recipient
    $mail_body = "The text for the mail..."; //mail body
    $subject = "Subject for reviever"; //subject
    $header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields

    ini_set('sendmail_from', 'me@domain.com'); //Suggested by "Some Guy"

    mail($recipient, $subject, $mail_body, $header); //mail command
    ?>
    something with the php.ini na setting na... iv tried it but so far its not working for me.... d jud mu send ang g email nku....

    hope naay mka tabang nku about ani na problem.... hopefully ma explain sad niya ba.... tnx...

  2. #2
    naa kay active nga mailserver...?

  3. #3
    dapat naa kay internet connection bro.

  4. #4
    aaahhh... yes... mail server diay kulang nku... i thot sa PHP na side ang error.... sa server diay... apache web server ra naa nku gd..... tnx..


    Quote Originally Posted by raybanz21 View Post
    dapat naa kay internet connection bro.
    grabe sad ka bro... hahahah.... naa sad tawn ko'y internet connection pag test nku sa emailing oi... hahah... tnx nlng for the laugh.... heheh

  5. #5
    suway gamit bay argosoft mailserver mao na ako gamit2x sauna, ma send niya ang mga mail to yahoo or gmail.... nya sayun rapud ayu i setup...

  6. #6
    <?php
    //create short variable names
    $name=$_POST['name'];
    $email=$_POST['email'];
    $feedback=$_POST['feedback'];

    //set up some static information
    $toaddress = "feedback@example.com";
    $subject = "Feedback from web site";
    $mailcontent = "Customer name: ".$name."\n".
    "Customer email: ".$email."\n".
    "Customer comments:\n".$feedback."\n";
    $fromaddress = "From: webserver@example.com";

    //invoke mail() function to send mail
    mail($toaddress, $subject, $mailcontent, $fromaddress);
    ?>

  7. #7
    mga bai.... tabang nsad... karon nka install nku ug mail server... "post fix" mail server... i think na configure na to ug tarong...?!?!?!

    <?php

    $Name = "Da Duder"; //senders name
    $email = "email@adress.com"; //senders e-mail adress
    $recipient = "someone@gmail.com"; //recipient
    $mail_body = "The text for the mail..."; //mail body
    $subject = "Subject for reviever"; //subject
    $header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields

    if( mail($recipient, $subject, $mail_body, $header) )
    echo "NA MAIL NA";
    ?>

    now... wala na ni error... peru pag tanaw nku sa recipient email add kay walay na dawat... so meaning wala jd diay to na send... unsay problem na inyu nakita ani?

  8. #8
    Bai.. Let me share lang.. I'm not a PHP programmer though I have tried the basic before (2001 at least 2months hehehe)... I like this language but it's not my line of language anymore, kay kabalo naka agad rata company... But anyways.. about sa imo problem:

    On your first post you said na sa imo research mogamit ka ug "mail() function" sa PHP ug mo send ka email.. yes this is true but today based sa ako research pud daghan man nagbuhat ug mga PHP class for sending email, that means you have the option to use mail() or used some free PHP classes for sending email in PHP.
    read lang ani.. PHP: Mail Functions - Manual.

    Next about these ERR "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 E:\APPLICATIONS\xampp\htdocs\email\class.Email.php on line 332 "
    I think this error means that when you invoke the command mail() it accesing the class Email.php that reads your mail server configuration found in "php.ini". Just try to read the php.ini naman diha "localhost" ang name sa SMTP SERVER/MailServer niya "port 25" (last read this php.ini 8years ago.. hehe). So pag read ana ni Error cya kay wala man kay configure imo computer na Mail Server (Localhost means this computer).

    Then last nimo post kay wala na ni Err but wala pud send try kuno tanaw imo Post Fix mail server wala bay naka queue na messages.. if naa then your program is good but your Post Fix is Bad.. hehe.. btaw wala pud ko kasulay ani mga mail server oi.. Try lang ug tanaw sa mail server ug naba naka queue if naa maybe configuration settings like Firewall or mga spam settings..

    Mao rana ako ma share...

    I hope wala mo naboringan.. kay mura binata..

    A person that knows everything is a master of nothing..

  9. #9
    sure dha oi..hahahah...

    smtp..help...hahaha

  10. #10
    Quote Originally Posted by raybanz21 View Post
    dapat naa kay internet connection bro.
    hohoho.. aligre.

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. help, im stuck! in PHP programming.
    By emailroy2002 in forum Programming
    Replies: 16
    Last Post: 07-08-2010, 11:43 PM
  2. Browser(IE) time limit in PHP/SQL
    By ondoy in forum Programming
    Replies: 11
    Last Post: 02-25-2008, 01:43 PM
  3. Frames in PHP
    By Orgasms in forum Programming
    Replies: 12
    Last Post: 10-21-2007, 07:20 PM
  4. dynamic links in PHP
    By silent-kill in forum Websites & Multimedia
    Replies: 16
    Last Post: 06-29-2007, 08:48 AM
  5. Counter problem in PHP
    By rusbel in forum Programming
    Replies: 0
    Last Post: 04-08-2007, 11:08 PM

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