views:

80

answers:

2

I am able to send and receive emails from my JSPs and associated Java code using the Java Mail API (javax.mail.*).

Now I would like to create a new POP3 email account programmatically when a user registers for my site.

I've found surprisingly little information about this with web searches. I would think it would be a somewhat common problem.

It appears that the Java Mail API does not provide any assistance in this area.

I have many email accounts available under my godaddy account, and to manually create an account, I just go to the godaddy email control panel, click Add, and specify the email address and password. This is exactly what I would like to do via a Java program.

Any ideas?

+1  A: 

Creation of EMail accounts is provider specific and as long as he doesn't provide an API to create accounts automatcally, I'd guess there's no way.

And I doubt that a lot providers allow automatic creation, there's too much abuse by spammers.

Andreas_D
Thanks. I will check with godaddy and see if they provide an API for this.
Jeremy Goodell
+1  A: 

You'd typically use the same user DB you for your mail accounts as you're using with you're website. Hence, as soon as a user registers on your website there is a mail account available. Using godaddy won't let you do so (I guess). You'll rather need your own SMTP/IMAP servers.

sfussenegger
Well, the accounts actually will only be used for receiving email, so I think I would just need a POP3 server? But I'm not sure that is possible to set up using my current virtual dedicated server setup at godaddy.
Jeremy Goodell
@Jeremy Emails are always delivered to an SMTP server. To access them, you have different choices like POP3, IMAP, web interface or command line tools. But SMTP is required to send and receive emails.
sfussenegger