Send mail using class.phpmailer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Send mail using class.phpmailer

    hi
    im trying to use class.phpmailer class to send emails but i dosnt work,
    i used that php code
    <?php
    $id = $_GET['id'];
    $email = "blackgun2002@yahoo.com";

    require("lib/class.phpmailer.php");

    $mail = new PHPMailer();
    $mail->Host = "localhost";
    $mail->From = $id"@yahoo.com";
    $mail->FromName = $id"@yahoo.com";
    $mail->AddAddress($email);
    $mail->Subject = "READ";
    $mail->Body = "hello <br> my id is $id";
    $mail->WordWrap = 50;
    if(!$mail->Send())
    {
    echo 'Message was not sent.';
    echo 'Mailer error: ' . $mail->ErrorInfo;
    }
    else
    {
    echo '<br>Mail sent to <? echo $email ?> they will reply within 24 hours,<br>Your tickt number sent to <? echo $id ?>
    </div>';
    }
    ?>

    please help me with the right code

    #2
    Hello mate.

    What are you trying to do ??

    Do you wish to plan text emails or html text emails

    You do not need stupid mail scripts that needs half of wall of stupid scripts to send 1 piss email...

    Added after 22 minutes:

    Html Mail sender !
    PHP Code:
    <?php
        $id 
    $_GET['id'];
        
    $to "$id@yahoo.com"
        
    $from "blackgun2002@yahoo.com"

        
    $subject "READ"

        
    //begin of HTML message 
        
    $message "<html> 
      <body bgcolor=\"#DCEEFC\"> 
        <center> 
            <font color=\"red\">Your id 
    $id!</font> <br> 
            <a href=\"http://YOURSITE/\">* YOURSITE</a> 
        </center> 
          <br><br>*** YOURSITE <br> Regards<br> YOURNAME 
      </body> 
    </html>"

      
     
        
    $headers "MIME-Version: 1.0rn"
        
    $headers .= "Content-type: text/html; charset=iso-8859-1rn"
        
    $headers  .= "From: $from\r\n"
        
         
        
    mail($to$subject$message$headers); 

        echo 
    "Message has been sent....!"
    ?>
    Last edited by subzero; 04.03.11, 02:23.
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #3
      i want to change from email example recive the message from $id@yahoo.com

      Comment


        #4
        i added the script there
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          its not changing sender email
          it print it into message and i want to change sender mail

          Comment


            #6
            yaar, its simple matter. Why dont u try urself n y u guys always dnt wanna learn!!

            Comment


              #7
              please im trying from 3 days at a code same with subzero code but it not changing sender email and tryed mail class and not working too

              Comment


                #8
                So what you want is

                User emails there id to email then there email is 23@yahoo.com and if they send to that mail is thereS?
                Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                Visit: WapMasterz Coming Back Soon!
                _______
                SCRIPTS FOR SALE BY SUBZERO
                Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                _______
                Info & Tips
                php.net
                w3schools.com

                Comment


                  #9
                  i want to change sender email that who behind the subject

                  Comment

                  Working...
                  X