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

    Default sending email problem


    Hi,


    These are the steps in registering a new user.

    1. A new user is registered (provide name, address, email etc.)
    2. An email is sent to the email he/she provided, which contains his login information.

    the problem now is the emial code. I've never done this before so I don't know how this works. I tried searching for help, and the acronym SMTP always pops up. and I don't know how that works either. I know I have to configure php.ini to be able to do this, but I don't know what to change. T_T

    here's a sample code i got from the net. I'm trying to make this work.

    <?php
    $email_to = "my_email@yahoo.com";
    $email_subject = "Test E-Mail (This is the subject of the E-Mail)";
    $email_body = "This is the body of the Email \nThis is a second line in the body!";

    if(mail($email_to, $email_subject, $email_body)){
    echo "The email($email_subject) was successfully sent.";
    } else {
    echo "The email($email_subject) was NOT sent.";
    }
    ?>

    Please Help me.

  2. #2
    C.I.A. Sarevok's Avatar
    Join Date
    Apr 2007
    Gender
    Male
    Posts
    2,802
    Blog Entries
    4
    dapat kahibaw ka sa SMTP server then port na gamiton (usually port 25 ni) makita man siguro na sa imong configuration file (.ini)

    mao na sila ang ichange sa imo configuration. although wa ko katry gamit php para send mail, pero pareha ra man na tanan SMTP protocol

  3. #3
    Use PHPMailer

  4. #4
    Agree.
    Setup a mailer daemon.

  5. #5
    unsa imong ISP?

  6. #6
    if nag install naka ug mail server and still no success? if you are using globe? murag problema gyud na.

  7. #7
    d man tingali mo matter kung globelines ba ka or dili kung igo lang ka mo send ug email.

    naka suway ko send email using php unya I think ssmtp na program to iyang gi gamit para send. mao may naka link sa /usr/bin/sendmail nako gd. then naka mail man jd siya bisag globelines ko.

    anyway pag install ug mail daemon then I think i set-up pa nimo ang php.ini nimo sa [mail function] na part. wa koy sure, naka limot nako gi unsa ni nako pag setup akong server.

  8. #8
    Quote Originally Posted by doomsweek View Post
    d man tingali mo matter kung globelines ba ka or dili kung igo lang ka mo send ug email.

    naka suway ko send email using php unya I think ssmtp na program to iyang gi gamit para send. mao may naka link sa /usr/bin/sendmail nako gd. then naka mail man jd siya bisag globelines ko.

    anyway pag install ug mail daemon then I think i set-up pa nimo ang php.ini nimo sa [mail function] na part. wa koy sure, naka limot nako gi unsa ni nako pag setup akong server.
    i do agree.

    @Ts, ipost daw ang unod sa imong config.ini or php.ini para matabangan nato ug tuis.

  9. #9
    Quote Originally Posted by doomsweek View Post
    d man tingali mo matter kung globelines ba ka or dili kung igo lang ka mo send ug email.

    naka suway ko send email using php unya I think ssmtp na program to iyang gi gamit para send. mao may naka link sa /usr/bin/sendmail nako gd. then naka mail man jd siya bisag globelines ko.

    anyway pag install ug mail daemon then I think i set-up pa nimo ang php.ini nimo sa [mail function] na part. wa koy sure, naka limot nako gi unsa ni nako pag setup akong server.
    maoba? anyway na ka encounter ko ani nga probs b4 sa globe and i ask sa ilang tech support, murag naka block ilang port, i forgot unsa to nga port. they advise me to use another port murag 587 man siguro to. good for you guys.

  10. #10
    i set ra to nimo ang "send mail from" sa php or apache nga configuration ba to.
    tapos imong smtp... i-set like smtp.gmail.com peru make sure ng gmail account pud imong "send mail from"... something inana... di ko sure sa port peru I think 587 kung gmail imo gamit na smtp.

    tapos sa imong code

    PHP Code:
    <?php 
    $email_to 
    "my_email@yahoo.com";
    $email_subject "Test E-Mail (This is the subject of the E-Mail)";
    $email_body "This is the body of the Email \nThis is a second line in the body!";

    if(
    mail($email_to$email_subject$email_body)){
    echo 
    "The email($email_subject) was successfully sent.";
    } else {
    echo 
    "The email($email_subject) was NOT sent.";
    }
    ?>
    di ko sure ani peru...
    gi check ra mn nimo if na call ba ang mail function peru wala mismo nimo gi-call ang mail function...

    something inani ako pasabot

    PHP Code:
    <?php 
    $email_to 
    "my_email@yahoo.com";
    $email_subject "Test E-Mail (This is the subject of the E-Mail)";
    $email_body "This is the body of the Email \nThis is a second line in the body!";

    mail($email_to$email_subject$email_body)

    if(
    mail($email_to$email_subject$email_body)){
    echo 
    "The email($email_subject) was successfully sent.";
    } else {
    echo 
    "The email($email_subject) was NOT sent.";
    }
    ?>
    anyway, dili ko sure. dugay2x na pud ko wala ka code

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. how to send email in vb6
    By Ryuugan in forum Programming
    Replies: 2
    Last Post: 01-24-2011, 02:47 PM
  2. MOVED: email problem.
    By vern in forum Networking & Internet
    Replies: 0
    Last Post: 11-01-2007, 07:50 AM
  3. email problem.
    By jouho in forum Software & Games (Old)
    Replies: 9
    Last Post: 10-31-2007, 05:35 PM
  4. yahoo email problem
    By bryan in forum Networking & Internet
    Replies: 11
    Last Post: 09-20-2006, 11:15 PM
  5. Send email to the future
    By xyberblue in forum Websites & Multimedia
    Replies: 4
    Last Post: 12-28-2005, 04:25 AM

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