sending user an email after they have completed registration successfully

This is a discussion on sending user an email after they have completed registration successfully within the alt.comp.lang.php forums, part of the PHP Programming Forums category; I would like to send my user an email telling them that they have logged in successfully. I would run ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-07-2007
Kevin Raleigh
 
Posts: n/a
Default sending user an email after they have completed registration successfully

I would like to send my user an email telling them that they have logged in
successfully.

I would run a google search on this but I don't know how to phrase the
question.
Can anyone advise my on how to send an auto responder to the user after
registrating.

I would like to use class.phpMailer.php as I have had very limited success
with it. That and I need to learn how to use it so I can begin the next
segment of the web project.

insight would be appreciated
thank you
Kevin


Reply With Quote
  #2 (permalink)  
Old 07-07-2007
Kevin Raleigh
 
Posts: n/a
Default Re: sending user an email after they have completed registration successfully

the first email was confusing so I reposted....


I would like to send my user an email after they register so that I can
verify their
email address.
..
Can anyone advise

I would like to use class.phpMailer.php as I have had very limited success
with it. That and I need to learn how to use it so I can begin the next
segment of the web project.

insight would be appreciated
thank you
Kevin


Reply With Quote
  #3 (permalink)  
Old 07-07-2007
Virginner
 
Posts: n/a
Default Re: sending user an email after they have completed registration successfully

"Kevin Raleigh" <kraleigh@sbcglobal.net> wrote in message
news:dsOdnXF__tWwZhPbnZ2dnUVZ_qSrnZ2d@giganews.com ...
> the first email was confusing so I reposted....
>
>
> I would like to send my user an email after they register so that I can
> verify their
> email address.
> .
> Can anyone advise


use the mail() function to:

a. Send a random password to their email address, rather than getting them
to enter one themselves. Once they received the password and logged into
you can provide a "change password" option.

or

b. Put in a "verified" field in the db. Send a unique URL to the user, a
copy of which is in the db. User clicks on URL in email, which fires a
script to make the verified field "true". They can then login using the
password they had originally provided.

Have you now sorted your form and header() issues? You have not commented on
that thread ;-)

D.


Reply With Quote
  #4 (permalink)  
Old 07-08-2007
Kevin Raleigh
 
Posts: n/a
Default Re: sending user an email after they have completed registration successfully

I posted earlier on the results of my header issues.
I redesigned my page so that all my php resided in the top of the page.
Natural this resolved the problem.
I just had to think about what everyone was telling me to do.
It didn't make sense earlier, now it does.

Could really use some help with the phpMailer script that I am working with.
Currently I can't connect as I have this error:

Warning: fsockopen() expects parameter 2 to be long, string given in
/home/content/r/a/l/raleigh123/html/php/class.smtp.php on line 105
Message could not be sent.
Mailer Error: Language string failed to load: connect_host

I read up on this error and it has something to with proxy settings that
affect this function:
Reason is, that script does not check validity of the portNum, which must be
integer in range of 1..65535.

I tried using (int) and ended up with the error that

Message could not be sent.
Mailer Error: Language string failed to load: connect_host



Can you advise on how I might move forward, where I might search for
information.

any insight appreciated

thank you

Kevin










"Virginner" <theDOTbin@virginLOSEIT.net> wrote in message
news:dQLji.6781$fi4.4233@newsfe7-win.ntli.net...
> "Kevin Raleigh" <kraleigh@sbcglobal.net> wrote in message
> news:dsOdnXF__tWwZhPbnZ2dnUVZ_qSrnZ2d@giganews.com ...
> > the first email was confusing so I reposted....
> >
> >
> > I would like to send my user an email after they register so that I can
> > verify their
> > email address.
> > .
> > Can anyone advise

>
> use the mail() function to:
>
> a. Send a random password to their email address, rather than getting them
> to enter one themselves. Once they received the password and logged into
> you can provide a "change password" option.
>
> or
>
> b. Put in a "verified" field in the db. Send a unique URL to the user, a
> copy of which is in the db. User clicks on URL in email, which fires a
> script to make the verified field "true". They can then login using the
> password they had originally provided.
>
> Have you now sorted your form and header() issues? You have not commented

on
> that thread ;-)
>
> D.
>
>



Reply With Quote
  #5 (permalink)  
Old 07-08-2007
Virginner
 
Posts: n/a
Default Re: sending user an email after they have completed registration successfully

Kevin,

have you simply tried the mail() function?


Reply With Quote
  #6 (permalink)  
Old 07-12-2007
Kevin Raleigh
 
Posts: n/a
Default Re: sending user an email after they have completed registration successfully

I am using your second suggestion, whereby the user is sent an email link
with a random number on it that resides in the database along with the user
"id". However I am having trouble understanding what the page should look
like that handles the incoming data from:
web address=
http://www.myUrl.com/pageThatHandlesScript.php?id="id&randNum="randNum"

I was wondering if someone could give me an idea of what the page looks like
that would validate incoming data. Having trouble describing this because I
don't know anything about it. But, basically if I send an email to my
recently logged in user and the address is dynamic how does the page connect
with a page on my server? Does the page connect with
http://www.myUrl.com/pageThatHandleScript.php
Will the browser just ignore the data after the question mark?

web address=
http://www.myUrl.com/pageThatHandlesScript.php?id="id&randNum="randNum"

The link contains the data needed to validate them but, ... confusion???


your insight would be most welcome
Thank You
Kevin
"Virginner" <theDOTbin@virginLOSEIT.net> wrote in message
news:dQLji.6781$fi4.4233@newsfe7-win.ntli.net...
> "Kevin Raleigh" <kraleigh@sbcglobal.net> wrote in message
> news:dsOdnXF__tWwZhPbnZ2dnUVZ_qSrnZ2d@giganews.com ...
> > the first email was confusing so I reposted....
> >
> >
> > I would like to send my user an email after they register so that I can
> > verify their
> > email address.
> > .
> > Can anyone advise

>
> use the mail() function to:
>
> a. Send a random password to their email address, rather than getting them
> to enter one themselves. Once they received the password and logged into
> you can provide a "change password" option.
>
> or
>
> b. Put in a "verified" field in the db. Send a unique URL to the user, a
> copy of which is in the db. User clicks on URL in email, which fires a
> script to make the verified field "true". They can then login using the
> password they had originally provided.
>
> Have you now sorted your form and header() issues? You have not commented

on
> that thread ;-)
>
> D.
>
>



Reply With Quote
  #7 (permalink)  
Old 07-12-2007
Virginner
 
Posts: n/a
Default Re: sending user an email after they have completed registration successfully

"Kevin Raleigh" <kraleigh@sbcglobal.net> wrote in message
news:zI-dnZmw2YepLwjbnZ2dnUVZ_qOpnZ2d@giganews.com...
>I am using your second suggestion, whereby the user is sent an email link
> with a random number on it that resides in the database along with the
> user
> "id". However I am having trouble understanding what the page should look
> like that handles the incoming data from:
> web address=
> http://www.myUrl.com/pageThatHandlesScript.php?id="id&randNum="randNum"
>

<SNIP>

Hi Kevin (plse don't top post!)

URL shouild look like http://www.fred.com/validate.php?id=999&code=1234

validate.php:

check existance of both $_GET["id"] and $_GET["code"]
look up $_GET["id"] in database and retrieve matching code
if $_GET["code"] matches code found in database, then
update datebase validated field to true or 'Y' or whatever
display appropriate message
else
display error message

Now, do I get a cut?


Reply With Quote
  #8 (permalink)  
Old 07-13-2007
Kevin Raleigh
 
Posts: n/a
Default Re: sending user an email after they have completed registration successfully

Sorry about the top post I hid one of the old messages.
I would indeed give you a cut if I were making any money on this site.
I am developing what is my first php web site for my church.

I appreciate the help
Kevin

"Virginner" <the.bin@LOSEITvirgin.net> wrote in message
news:f758gs$ngd$1@aioe.org...
> "Kevin Raleigh" <kraleigh@sbcglobal.net> wrote in message
> news:zI-dnZmw2YepLwjbnZ2dnUVZ_qOpnZ2d@giganews.com...
> >I am using your second suggestion, whereby the user is sent an email link
> > with a random number on it that resides in the database along with the
> > user
> > "id". However I am having trouble understanding what the page should

look
> > like that handles the incoming data from:
> > web address=
> > http://www.myUrl.com/pageThatHandlesScript.php?id="id&randNum="randNum"
> >

> <SNIP>
>
> Hi Kevin (plse don't top post!)
>
> URL shouild look like http://www.fred.com/validate.php?id=999&code=1234
>
> validate.php:
>
> check existance of both $_GET["id"] and $_GET["code"]
> look up $_GET["id"] in database and retrieve matching code
> if $_GET["code"] matches code found in database, then
> update datebase validated field to true or 'Y' or whatever
> display appropriate message
> else
> display error message
>
> Now, do I get a cut?
>
>



Reply With Quote
  #9 (permalink)  
Old 07-13-2007
Virginner
 
Posts: n/a
Default Re: sending user an email after they have completed registration successfully

"Kevin Raleigh" <kraleigh@sbcglobal.net> wrote in message
news:raOdnUq6sPrcKQvbnZ2dnUVZ_gadnZ2d@giganews.com ...
> Sorry about the top post I hid one of the old messages.
> I would indeed give you a cut if I were making any money on this site.
> I am developing what is my first php web site for my church.
>
> I appreciate the help
> Kevin
>
> "Virginner" <the.bin@LOSEITvirgin.net> wrote in message
> news:f758gs$ngd$1@aioe.org...
>> "Kevin Raleigh" <kraleigh@sbcglobal.net> wrote in message
>> news:zI-dnZmw2YepLwjbnZ2dnUVZ_qOpnZ2d@giganews.com...
>> >I am using your second suggestion, whereby the user is sent an email
>> >link
>> > with a random number on it that resides in the database along with the
>> > user
>> > "id". However I am having trouble understanding what the page should

> look
>> > like that handles the incoming data from:
>> > web address=
>> > http://www.myUrl.com/pageThatHandlesScript.php?id="id&randNum="randNum"
>> >

>> <SNIP>
>>
>> Hi Kevin (plse don't top post!)
>>
>> URL shouild look like http://www.fred.com/validate.php?id=999&code=1234
>>
>> validate.php:
>>
>> check existance of both $_GET["id"] and $_GET["code"]
>> look up $_GET["id"] in database and retrieve matching code
>> if $_GET["code"] matches code found in database, then
>> update datebase validated field to true or 'Y' or whatever
>> display appropriate message
>> else
>> display error message
>>
>> Now, do I get a cut?
>>


That was a top post!
Is that script working now?


Reply With Quote
  #10 (permalink)  
Old 07-14-2007
Kevin Raleigh
 
Posts: n/a
Default Re: sending user an email after they have completed registration successfully

I have what I think is the correct logic.

I set the registration up check it
If no errors and data is loaded, I call an email function that sends my
email to my pastor to approve the registrant.
If the pastor clears the person for access to the protected area of the
website an email is sent to the registrant from the site welcoming them to
the site.

I just need to test it out. I haven't had a chance yet.
Been pretty busy on this end. Will probably tackel it late saturday
afternoon.

Will post back with results, and if you like I will post the code that I
came up with for the entire process. I would welcome feedback on it. I think
that it is a little bloated in some areas and could possibly be peared down,
but that is a task for another time.

Thank you
Kevin Raleigh
"Virginner" <theDOTbin@virginLOSEIT.net> wrote in message
news:n9Hli.8420$XR.4201@newsfe4-win.ntli.net...
> "Kevin Raleigh" <kraleigh@sbcglobal.net> wrote in message
> news:raOdnUq6sPrcKQvbnZ2dnUVZ_gadnZ2d@giganews.com ...
> > Sorry about the top post I hid one of the old messages.
> > I would indeed give you a cut if I were making any money on this site.
> > I am developing what is my first php web site for my church.
> >
> > I appreciate the help
> > Kevin
> >
> > "Virginner" <the.bin@LOSEITvirgin.net> wrote in message
> > news:f758gs$ngd$1@aioe.org...
> >> "Kevin Raleigh" <kraleigh@sbcglobal.net> wrote in message
> >> news:zI-dnZmw2YepLwjbnZ2dnUVZ_qOpnZ2d@giganews.com...
> >> >I am using your second suggestion, whereby the user is sent an email
> >> >link
> >> > with a random number on it that resides in the database along with

the
> >> > user
> >> > "id". However I am having trouble understanding what the page should

> > look
> >> > like that handles the incoming data from:
> >> > web address=
> >> >

http://www.myUrl.com/pageThatHandlesScript.php?id="id&randNum="randNum"
> >> >
> >> <SNIP>
> >>
> >> Hi Kevin (plse don't top post!)
> >>
> >> URL shouild look like http://www.fred.com/validate.php?id=999&code=1234
> >>
> >> validate.php:
> >>
> >> check existance of both $_GET["id"] and $_GET["code"]
> >> look up $_GET["id"] in database and retrieve matching code
> >> if $_GET["code"] matches code found in database, then
> >> update datebase validated field to true or 'Y' or whatever
> >> display appropriate message
> >> else
> >> display error message
> >>
> >> Now, do I get a cut?
> >>

>
> That was a top post!
> Is that script working now?
>
>



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:42 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0