Web Analytics Made Easy -
StatCounter Inserting activation link - CodingForum

Announcement

Collapse
No announcement yet.

Inserting activation link

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

  • Inserting activation link

    to all,
    ok i am suppose to be doing a registeration where after the user has clicked the "submit" button, there will be an email sent to the user automatically and immediately. i have done it but now..i am not sure where can i insert an activation link for the user to click in order to activate his/her account. the mail code that i have done is this:

    PHP Code:
    set_time_limit(3600);
        echo (
    "{$_SERVER['SERVER_NAME']}");
        
        
    /* To send HTML mail, you can set the Content-type header. */
        
    $headers  "MIME-Version: 1.0\r\n";
        
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

        
    set_time_limit(3600);
        
    $mail = new as_Mail();
        
    $mail->to = ($email);
        
    $mail->from "[email protected]{$_SERVER['SERVER_NAME']}.com";
        
    $mail->cc "[email protected]";
        
    $mail->bcc "[email protected]";
        
    $mail->subject "**BULK** Testing the as_Mail class";
        
    $mail->body "This is the time this <b>mail</b> was generated: " date("F j, Y, g:i a");
        
    $mail->rigorous_email_check true;    
        
    $mail->rigorousEmailCheck($mail->to);
        
        
        if(
    $mail->send())
            echo(
    "Successfully sent an email titled $mail->subject!");
        else
            echo(
    "Error while attempting to send an email titled $mail->subject: " $mail->errorMsg());

        echo(
    "<br>");
        echo(
    str_replace("\r\n""<br>"$mail->viewMsg()));*/ 
    all the experts out there....need ur advice...thanks in advance.
    Warm Regards,
    Mivec

  • #2
    Well, you've got the content type header in place, so you should be able to use straight html to add the link...

    PHP Code:
    $mail->body.="<br /><a href='linkToInclude'>Link text</a>"
    Create accessible online surveys -::- Koobten.com - compare netbook prices and reviews -::- Affordable, reliable hosting for less than $20 per year
    Zend Certified Engineer

    Comment


    • #3
      In your link you will need to add some parameters for your activation script to grab to identify the account to activate. Typically whatever you are using as a primary key for the accounts in your database table (assuming you are using a database)
      Spookster
      CodingForum Supreme Overlord
      All Hail Spookster

      Comment

      Working...
      X