Page 1 of 1

How to create mail ids in server dynamically

Posted: Fri Sep 15, 2006 1:11 pm
by mahendran
Hi everyone,

Iam mahendran and i working as a php programmer for the last 8months. I have a doubt to create mail ids in server dynamically using PHP.

I wants to write a program for generating alias email ids in server dynamically when user register into the site by giving his original id such as(yahoo,gmail,etc..). The created alias ids are given to other users whose see that user profile. The users can use this ailas id for send mails. if they send the mail they can goes to the original id of alias id of that user ....
this is my task.

user given originalid---makes--------> alias id---------------stored in server.

sending Mail----to------->alias id-----------search for---------->original id---------------->user inbox

Anyone have idea how to implement this by scripting. It is very useful for me.
Thanks to all

Posted: Thu Sep 21, 2006 3:46 am
by Benjamin
When you save a user's email to the database table, create another field for the alias. Generate a random 5-10 digit number for the alias or something. Be sure to index both the email and alias fields in the database.

When a user sends a message to the alias, pull the real email address by using the alias to look it up, then send the message. This is fairly easy to do.

If you get stuck, post your code and we will help you.

Posted: Thu Sep 21, 2006 12:24 pm
by mahendran
Hi Astions,

First I would like to give my thanks to you for your nice reply. Actually what happens in my site is mail function can happening in server only. lets say you have an alias id of my domain. You send mail to this alias id from your inbox(like gmail,yahoo) the mail comes to my domain and take the original id for the corresponding alias id and the mail can forward to this original id.

Please suggest your ideas for the above issues.
Thanku