How can I send confirmation mail.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dhiru1009
    New Member
    • Aug 2008
    • 24

    How can I send confirmation mail.

    Hi guys

    First of all thanks for helping me out with other posts. I have another problem here. I want to send confirmation link to emaill user has provided when they register to my website. How can I achieve this. Please help me.

    Thanks
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    I'd say just paste the link in the message body, most email clients will render this to a link. Otherwise you could write a html mail (though not everybody accepts html mails or strips them down to text). use your favourit mailscript.

    Comment

    • nomad
      Recognized Expert Contributor
      • Mar 2007
      • 664

      #3
      not to sure what you want but if you want the clients to know that you received their info then you could add a // redirect to success page
      in your .php file



      [PHP]// send email
      $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>" );

      // redirect to success page
      if ($success){
      print "<meta http-equiv=\"refresh \" content=\"0;URL =thankscontact. htm\">";
      }
      else{
      print "<meta http-equiv=\"refresh \" content=\"0;URL =error.htm\">";
      }[/PHP]

      I hope that is what you're looking for
      nomad
      ps make sure you make a thankscontact.h tm (or whatever you name it)file

      Comment

      • Muddasir
        New Member
        • Jun 2007
        • 49

        #4
        Okay let i guess this is what you want....not sure but it might help you...

        when user fills a registration form and hit submit button. You probably do insertion in DB, when you do insertion get the last inserted id. and store it in variable let say '$userid'. Make link in the email that you will send to the user and that link will contain that last inserted id e.g the link might look like this.

        Code:
        <a href='http://yoursite.com/authentication.php?userid=$userid'>Click Here</a>
        Make sure to encrypt $userid before using it in the above link.

        When user click on this link that link will bring user to authentication. php. Here first you will decrypt $userid and then find this ID in your DB. If you find a record set then user will be authenticated and you can set his/her status as verified user. and refdirect to THANK YOU page or Login page. what ever you want.


        Hope this helps you.

        Comment

        Working...