Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Add Content
Cesiwa2
#1 Posted : Thursday, January 12, 2012 7:39:06 PM(UTC)
Rank: Newbie
Groups: Registered

Joined: 1/12/2012(UTC)
Posts: 4
Location: sweden
Hi, Seems like the password recovery does not work or at least I didn't get an email for 24 hours. Anyway.

Im trying to figure out a solution for sending an email with an contenttype. I wanna have full control over the fields so thats whay Im wanna create a content type for a orderform at the frontsite (not the admin).

Im able to create my own contenttype "Customer" and using the Code helper add content Im able to add Customers to the folder. Is it possible to intercept this message and send an email instead? I actually dont want it to save in the repository.

If thats possible. Is it possible to create a more advanced Content Add snippet that takes the schema and create the appropriate validation messages?

Now it looks like this: data-val-required="title is required", (something like @Field.ValidationMessage would have been nice)



Maybe I should just create a module instead?
jifeng
#2 Posted : Friday, January 13, 2012 1:40:24 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
1. Please check if you have set the smtp setting in web.config correctly.

<system.net>
<mailSettings>
<smtp from="no-reply@kooboo.com">
<network host="127.0.0.1"/>
</smtp>
</mailSettings>
</system.net>


2. Yes, you need to create a page plugin to send the mail. It is easy to do, inherit from IPagePlugin, upload the assembly under "Extensions\Plug-ins", assign the plugin to the View or Page.

3. In the lastest released version, the validation rule just can be do like that. Will provide some new helper method for that in the next version.
File Attachment(s):
EmailPageplugin.zip (4kb) downloaded 4 time(s).

You cannot view/download attachments. Try to login or register.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
ella
#3 Posted : Tuesday, March 06, 2012 7:38:17 AM(UTC)
Rank: Advanced Member
ella
Groups: Registered

Joined: 6/30/2011(UTC)
Posts: 57
Location: Russia
Hi, I try to understand what your EmailPageplugin does... %) It's too difficult source code... Can you write some sample view for use this plugin?
jifeng
#4 Posted : Wednesday, March 07, 2012 4:21:24 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
HI ella:

It just a sample plugin used in our project. The brief is creating some View to be used in Email subject/body, the user can be easy to change the email subject/body.

1. Create a View called "Email.Subject", using "FrontHtmlHelper.RenderView(pageContext.ControllerContext, "Email.Subject", pageContext.ControllerContext.Controller.ViewData);" to get the subject text.

2. Create a View called "Email.Body", using "FrontHtmlHelper.RenderView(pageContext.ControllerContext, "Email.Body", pageContext.ControllerContext.Controller.ViewData);" to get the body html text.

3. Send the email.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
1 user thanked jifeng for this useful post.
ella on 3/7/2012(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.541 seconds.