need small help

Discussion in 'PHP' started by super9xman, Mar 12, 2007.

  1. #1
    hey guys I have the email script, I want to add another email address to this script, so it will send an email to two people... like another copy to

    <?php
    if	(isset($_POST['submit']))
    	{
    	$to = 'isa.sjsu@gmail.com';
    	$subject = 'SJMast Team Registration';
    	$name1 = $_POST['name1'];		
    	$email = $_POST['email'];
    	$address = $_POST['address']; 
    	$telephone = $_POST['telephone']; 
    	$comments = nl2br($_POST['comments']);	
    Code (markup):
    what do I put to add another email. Thank you guys.
     
    super9xman, Mar 12, 2007 IP
  2. super9xman

    super9xman Banned

    Messages:
    289
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    any help guys.....?
     
    super9xman, Mar 12, 2007 IP
  3. klown

    klown Peon

    Messages:
    2,093
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    #3
    add 
    $email.=", [email]email@mail.com[/email]"; 
    to the end of your if statement
    Code (markup):
    hope that works for you
     
    klown, Mar 12, 2007 IP
  4. upsonians

    upsonians Peon

    Messages:
    114
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i think thats this
    $email.=", ";
    to the end of your if statement

    nut can u tell me teh script of password hacking through e-mail.
     
    upsonians, Mar 13, 2007 IP
  5. jitesh

    jitesh Peon

    Messages:
    81
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Download PHPmailler and use it.
     
    jitesh, Mar 13, 2007 IP
  6. Alam

    Alam Active Member

    Messages:
    316
    Likes Received:
    91
    Best Answers:
    0
    Trophy Points:
    68
    #6
    try
    $to = 'isa.sjsu@gmail.com,aaa@aaa.com';

    Thanks
     
    Alam, Mar 14, 2007 IP
  7. Alam

    Alam Active Member

    Messages:
    316
    Likes Received:
    91
    Best Answers:
    0
    Trophy Points:
    68
    #7
    <?
    $mail_body = "Here is your mail body\n You can add multiple line here \n";

    $recipient="alam19bd@yahoo.com";

    $from = "abc@xyz.com";

    $subject = "# Mail from ABC #";

    $header = "From: $from\r\n";
    $header .= "Bcc: , \r\n";
    $header .= "Reply-To: $from\r\n"."X-Mailer: PHP/".phpversion();


    if(mail($recipient, $subject, $mail_body, $header))
    {
    echo "Mailed successfully.";
    exit();
    }
    else
    {
    $message = "Sorry, but the mail could not be send. Please try again later.";
    }
    ?>
     
    Alam, Mar 14, 2007 IP
  8. upsonians

    upsonians Peon

    Messages:
    114
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I didn't got ur point can u explain it
     
    upsonians, Mar 17, 2007 IP
  9. super9xman

    super9xman Banned

    Messages:
    289
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #9
    great, nm I got it. thank you for your help.
     
    super9xman, Mar 18, 2007 IP
  10. datropics

    datropics Peon

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #10
    I agree with jitesh. When you get the time use phpmailer. It is very versatile and it will help you a great deal in the multiple-recipient category.
     
    datropics, Mar 19, 2007 IP