Developer forum

Forum » Development » API Send user registration email

API Send user registration email

Mikkel Høst
Reply

Hi Guys.

DW 8.3.0.4 - Can i send the Create user email, to a user i create with the UserManagement class ?

Maybe by pointing to the paragraph where the extranet extented module is and the the settings from here?

 

 

 

 

 

 


Replies

 
Mikkel Høst
Reply

 


var props = Properties.LoadProperties(255); //ID of the paragraph
ParagraphSettings ps = new ParagraphSettings(props);

Template mailTemplate = new Template("UserManagement/" + ps.ConfirmationEmailTemplate);
Renderer.RenderUser(newUser, mailTemplate, true, ps.PagingHandler);

MailMessage mm = new MailMessage(ps.ConfirmationEmailFromAddress, newUser.Email);
mm.Subject = ps.ConfirmationEmailSubject;                                    
mm.IsBodyHtml = true;
mm.Body = mailTemplate.Output();
EmailHandler.Send(mm, true);
 
Mikkel Høst
Reply

Arrg darn editor!!! 

 
Nicolai Høeg Pedersen
Reply

Hi Mikkel

 

Was your code the solution? I reformatted it to look good. What browser did you use?

 

Thanks, Nicolai

 

You must be logged in to post in the forum