By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,649 Members | 2,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,649 IT Pros & Developers. It's quick & easy.

How to use P3Admin to create email accounts?

P: n/a
I am very new to asp.net and I am currently working on an application
that when users sign up it also creates a email account for them.I have
done some reserch and found that this is possible to do using
P3admin.dll but for the life of me I cannot figure out how. Has anyone
successfully done this and/or have an example I could look at? (C#)

Apr 28 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
http://www.motobit.com/tips/detpg_ad...count-windows/


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Brady Love" <op******@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
I am very new to asp.net and I am currently working on an application
that when users sign up it also creates a email account for them.I have
done some reserch and found that this is possible to do using
P3admin.dll but for the life of me I cannot figure out how. Has anyone
successfully done this and/or have an example I could look at? (C#)

Apr 28 '06 #2

P: n/a
I have been looking at that but I am having a hard time converting it
to c# (never worked with visual basic before) Is there anyone that can
help me out there?

Apr 28 '06 #3

P: n/a
I have been looking at that but I am having a hard time converting it
to c# (never worked with visual basic before) Is there anyone that can
help me out there?

Apr 28 '06 #4

P: n/a
I think i found the problem, which isnt fixable i dont think. I am
guessing the reason I cannot get it to work is because my webserver
doesnt have the p3admin.dll registered? Would that cause any problems?

Apr 28 '06 #5

P: n/a
http://www.carlosag.net/Tools/CodeTr...r/default.aspx
....should give you a good headstart:

public P3ADMINLib.P3User AddPop3User(string MachineName, string UserName, string DomainName, string
Password) {
// get a configuration object.
P3ADMINLib.P3Config P3 = new P3ADMINLib.P3Config();
// get the object from a VB Script/JScript
// Set P3 = CreateObject("P3Admin.P3Config")
// Connect To the remote computer.
if ((MachineName.Length > 0)) {
P3.MachineName = MachineName;
}
P3ADMINLib.P3Domain Domain;
P3ADMINLib.P3User User;
// get the domain object
// TODO: On Error Resume Next Warning!!!: The statement is not translatable
Domain = P3.Domains.Item[DomainName];
if ((Err == 2147942403)) {
// The domain is registered In SMTP but Not In POP3
}
else if ((Err == 2147943755)) {
// the domain does Not exist. Create it.
// TODO: On Error Resume Next Warning!!!: The statement is not translatable
P3.Domains.Add;
DomainName;
if ((Err != 0)) {
// On Error GoTo 0
Err.Raise;
Err;
("Domain "
+ (DomainName + " cannot be added."));
}
}
// add a user account
Domain.Users.AddEx;
UserName;
Password;
if ((Err == 134246480)) {
// ERROR_FILE_EXISTS
// the user account already exists.
// do some action In this Case.
}
// get the created user account
User = Domain.Users.Item[UserName];
return User;
}

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Brady Love" <op******@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
I have been looking at that but I am having a hard time converting it
to c# (never worked with visual basic before) Is there anyone that can
help me out there?

Apr 28 '06 #6

P: n/a
Umm, yeah, I'd think so.

Is it a Windows 2003 Server ?

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Brady Love" <op******@gmail.com> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com...
I think i found the problem, which isnt fixable i dont think. I am
guessing the reason I cannot get it to work is because my webserver
doesnt have the p3admin.dll registered? Would that cause any problems?

Apr 28 '06 #7

P: n/a
Yes. Ill try with the code you supplied and see if it works then, thank
you

Apr 28 '06 #8

P: n/a
Okay I tried with your code and here is what I got. I guess ill have to
see if my host will register the dll :(

Retrieving the COM class factory for component with CLSID
{27AAC95F-CCC1-46F8-B4BC-E592252755A9} failed due to the following
error: 80040154.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException:
Retrieving the COM class factory for component with CLSID
{27AAC95F-CCC1-46F8-B4BC-E592252755A9} failed due to the following
error: 80040154.

Source Error:

Line 27: public P3ADMINLib.P3User AddPop3User(string MachineName,
string UserName, string DomainName, string Password)
Line 28: {
Line 29: P3ADMINLib.P3Config P3 = new P3ADMINLib.P3Config();
Line 30:
Line 31: if (MachineName.Length > 0)

Apr 29 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.