php scripts for email authentication

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default php scripts for email authentication

    Hi,
    is there any script to authenticate an email address entered in a form
    field?

    I used the php mail() function, using the following (where my email
    field on the form is called "email"):

    $email = explode('@',$email);
    $mailhost = $email[1];
    $mailhost=$mailhost.".";

    $to = [email]myname@here.com[/email];
    $subject = "this is the email subject";

    /* message */
    $message = 'text of the message';
    $headers = "From: ".$email."\r\n";

    /* and now mail it */
    mail($to, $subject, $message, $headers);

    I do get the an email when I press submit, but the "From: " field is
    nothing like what I entered in the form field.
    It prints something like "From: [email]Array@preteus.net[/email]"

    This is basically for someone who is downloading a utility and I need to
    send him the activation key (and verify the email entered.)

    TIA.


    Xerxes Guest

  2. Similar Questions and Discussions

    1. User Authentication Scripts
      Okay i have a page where it captures a user name and password, and once i type in the correct user name and password, i want the user details to...
    2. Email Scripts, CDOSYS, and Security
      I am a newbie with Dreamweaver and with ASP.NET. I created a form where the data is submitted to a SQL database and an email is sent notifying the...
    3. CS: Scripts do not appear in Scripts menu
      I have several utility AppleScripts that I created for Illustrator 10. I'd like to use these in CS, and they work correctly when I choose "Browse"...
    4. Forms authentication then redirection to a secure web with NT authentication?
      Hi, I want to allow access to particular secured intranet web sites. These intranet are stored in sharepoint (2003 version) Actually I've...
    5. scripts that control other scripts
      Is there any behaviour script that when attached to a sprite can control the functionality of any other scripts attached to that sprite? I want to...
  3. #2

    Default Re: php scripts for email authentication

    Xerxes écrivit:
    > I used the php mail() function, using the following (where my email
    > field on the form is called "email"):
    >
    > $email = explode('@',$email);
    here you are converting the string $email to an array of two items.
    > $headers = "From: ".$email."\r\n";
    here you try to convert an array into a string. the result is the word
    "Array" (which is probably not what you are expecting ...)


    --
    P'tit Marcel
    P'tit Marcel Guest

  4. #3

    Default Re: php scripts for email authentication

    "Xerxes" <ashkaan57@hotmail.com> wrote in message news:<ac269f8e50395ef6f4b4c4cbee8a64ce@TeraNews>.. .
    > Hi,
    > is there any script to authenticate an email address entered in a form
    > field?
    The code is quite common. Almost, all books have that script esp
    the one by Rasmus. If you search the net, you can get that one.

    Anyway, the best idea is to send the activation code & ask the user
    to activate. If the user doesn't activate the account within 1 or 2
    weeks then delete the user.

    ---
    "We live to die; we die to live"
    Email: rrjanbiah-at-Y!com
    R. Rajesh Jeba Anbiah Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139