Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Automatic email | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Mercury

Shyguy
Level: 16

Posts: 26/88
EXP: 18132
For next: 2124

Since: 07-08-04
From: Hihihi.

Since last post: 1 day
Last activity: 1 day
Posted on 08-14-04 11:02 PM Link | Quote
In PHP, how do you send an automatic email?
The registering with an Acmlmboard is too easy, so what I want to do is the following:

when a person registers an account, an email will be send to his/her address with a password.
With that password he/she can login and activate the account.


Thanks .


(edited by Mercury on 08-14-04 02:03 PM)
(edited by Mercury on 08-14-04 02:04 PM)
DarkSlaya
POOOOOOOOOOOORN!
Level: 88

Posts: 1253/4249
EXP: 6409254
For next: 241410

Since: 05-16-04
From: Montreal, Quebec, Canada

Since last post: 8 hours
Last activity: 5 hours
Posted on 08-14-04 11:09 PM Link | Quote
Use the mail() function:

Something like that should work (not sure thought):

if ($action == register) {
mail("$mail", "$Title of the Mail", "$Account Info");
echo "An E-Mail with your account informations have been sent!";
}


For more about the mail() function: Click here


(edited by Cervantes on 08-14-04 02:09 PM)
(edited by Cervantes on 08-14-04 02:10 PM)
Mercury

Shyguy
Level: 16

Posts: 27/88
EXP: 18132
For next: 2124

Since: 07-08-04
From: Hihihi.

Since last post: 1 day
Last activity: 1 day
Posted on 08-14-04 11:12 PM Link | Quote
Ah, didn't know there exists a mail function .
Thanks, I'll try it out .


Edit: Hmmm, I tried it (with my own mail address), but still haven't received a mail.
Could it be that it takes longer than a few hours?


(edited by Mercury on 08-14-04 05:27 PM)
Sokarhacd

Ball and Chain Trooper
Resistance is Futile
You Will Be Assimilated
Hab SoSlI' Quch
Level: 61

Posts: 354/1757
EXP: 1799888
For next: 76708

Since: 03-15-04

Since last post: 6 days
Last activity: 4 hours
Posted on 08-15-04 04:18 AM Link | Quote
the mail function has to be enabled, if you have hosting with some company, then its usually enabled, if you run a web server on your own pc, and its windows, then it doesnt work by default, I think you need a smtp server and such....
Mercury

Shyguy
Level: 16

Posts: 28/88
EXP: 18132
For next: 2124

Since: 07-08-04
From: Hihihi.

Since last post: 1 day
Last activity: 1 day
Posted on 08-15-04 05:33 AM Link | Quote
I host it with a company.
Can I check myself if it's enabled (some .ini file or so)?
DarkSlaya
POOOOOOOOOOOORN!
Level: 88

Posts: 1264/4249
EXP: 6409254
For next: 241410

Since: 05-16-04
From: Montreal, Quebec, Canada

Since last post: 8 hours
Last activity: 5 hours
Posted on 08-15-04 05:35 AM Link | Quote
Originally posted by Mercury

Can I check myself if it's enabled (some .ini file or so)?


I belive that phpinfo() will tell you.
Mercury

Shyguy
Level: 16

Posts: 29/88
EXP: 18132
For next: 2124

Since: 07-08-04
From: Hihihi.

Since last post: 1 day
Last activity: 1 day
Posted on 08-15-04 05:15 PM Link | Quote
As far as I can see, it seems enabled.
But haven't got any mail, I'll study it .
ErkDog

Fuzz Ball
Level: 47

Posts: 702/982
EXP: 752190
For next: 14013

Since: 03-15-04
From: Richmond, VA

Since last post: 40 days
Last activity: 19 days
Posted on 08-15-04 07:36 PM Link | Quote
I would suggesting finding a simple PHP E-Mail form script... getting that to work properly, then use the code from that
Mercury

Shyguy
Level: 16

Posts: 30/88
EXP: 18132
For next: 2124

Since: 07-08-04
From: Hihihi.

Since last post: 1 day
Last activity: 1 day
Posted on 08-15-04 08:18 PM Link | Quote
Sorry, it works now .
It was probably just a syntax error, thanks again .
DarkSlaya
POOOOOOOOOOOORN!
Level: 88

Posts: 1307/4249
EXP: 6409254
For next: 241410

Since: 05-16-04
From: Montreal, Quebec, Canada

Since last post: 8 hours
Last activity: 5 hours
Posted on 08-15-04 08:19 PM Link | Quote
No problem, I discovered that helping people was fun.
And I'm now used to it, since I'm helping a few people on a board dedicated to PHP.


(edited by Cervantes on 08-15-04 11:19 AM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - Automatic email | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.020 seconds.