This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Welcome to the Ranch.
First step would be to find out if Yahoo provides some API which would let you create accounts "externally"
Without such an API, there is nothing you can do*.
*You might try to monitor (using tools like firebug) the calls made and the data/data format used when you manually create an account using the browser, and then use something like say URLConnection to do the same from your code, but this would not be a reliable solution.
Shefali Sharma wrote:Can anybody help me out to create yahoo email id through java code??
Robot type registration is normally frowned upon and I would be surprised if this were allowed by Yahoo either technically or legally. A quick look at the source of the Yahoo registration page shows that there are a ton of hidden fields which it would be easy to emulate but I'm betting (though I don't have a Yahoo account) that one needs some form of post-registration confirmation to complete the registration.
Joined: Aug 13, 2013
Thank you !! I would be starting from searching Yahoo API if something exists like this and get back to here.
Any help in meanwhile would be appreciated.
The requirement to create a yahoo email account or for that matter any third party email account from Java code isn't common. Why do you want it that way? Can you explain a bit more about what you are after?
Actually I am working on a project where user needs to register and give his email id with any of the domain
and if user do not have any account so I want to provide the user with the facility to generate email account right there by
just giving his desired userId and password(and email account would be created at back-end with java code for this emailid) , so that my application can send email to this new generated email id through java API(which I am already doing with my existing code for user
who has email account) also user can access this account.
In-short I want to register at yahoomail by java code.
I suspect you should be looking for a different solution. I would not be happy with you creating an email account for me or giving my user name and password to an email account as part of the installation of your program. The standard approach is just to ask the user for his email address and then send him an email with a confirmation link.
Joined: Aug 13, 2013
I would just create email account with username and password that would be given by user itself , however user can change his/her password anytime
as we do normally. This will remove the user's burden to create email account by filling registration form.
And this would be applied only if user does not have any email account.
Shefali Sharma wrote:Actually I am working on a project where user needs to register and give his email id with any of the domain
and if user do not have any account so I want to provide the user with the facility to generate email account right there
It would be easier (and better) to provide a link to open a new tab/window with the page at yahoo.
When a human registers at yahoo, there is the option to accept their policies. You'd be skipping that if you used your code to do it.
I would go back to whoever gave you those requirements and explain the security implications, explain the difficulty of implementation and suggest the more normal and secure approach of sending a confirmation email that the user needs to acknowledge. I have always found that the security argument is the best trump card.