1
Answer

Sending Mail in Gmail and that Message show in our App

Photo of Md Saud Alam

Md Saud Alam

7y
233
1
Requirement as below:

a) 1 Mail id will be created which is linked to all 255 or more email id (Like yahoo group email id)

b) Any person in group, if drops email to this group email id,then email should be sent to all member of group linked to this group id...and taking the subject of this email ... automatically one discussion forum topic should be created.

c) If any member, changes subject and sends email, then it needs to be considered as 2nd topic

Answers (1)

0
Photo of Dharmendra Singh
NA 179 34.6k 11y
you can use ViewBag for returning value and access through foreach on view,

Suppose I have a simple records
Id    Name    Status
1     Ram      true
2     Shyam   false

on model

public ABC
{
public int Id{get; set;}
public string Name{get; set;}
public bool Status{get; set;}
}

on Controller

List<ABC> items=new List<ABC>();
items.Add(new ABC{Id=1,Name="Ram",Status=true});
items.Add(new ABC{Id=2,Name="Shyam",Status=false});
ViewBag.dyProp = items;

you should use on view



@foreach(var item in ViewBag.dyProp)
{
if(item.Status)
{
// add approved values
}
}


@foreach(var item in ViewBag.dyProp)
{
if(!(item.Status))
{
// add not approved values
}
}