-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail_object.js
More file actions
107 lines (97 loc) · 2.06 KB
/
email_object.js
File metadata and controls
107 lines (97 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
var kevin = {
name: "Kevin R",
email: "kevin@example.com",
password: "hash_goes_here",
incoming_server: {
ip: "127.0.0.1",
port: 3300
},
outgoing_server: {
ip: "127.0.0.1",
port: 4400
}
}
var email_01 = {
sender: "mary@example.com",
receipient: "kevin@example.com",
// timestamp = Date(),
subject: "Blah",
text: "blah blah blah blah",
priority: false
}
var email_02 = {
sender: "mary@example.com",
receipient: "kevin@example.com",
// timestamp = Date(),
subject: "Blah",
text: "blah blah blah blah",
priority: false
}
var email_03 = {
sender: "george@example.com",
receipient: "kevin@example.com",
// timestamp = Date(),
subject: "Blah",
text: "blah blah blah blah",
priority: false
}
var email_04 = {
sender: "kevin@example.com",
receipient: "mary@example.com",
// timestamp = Date(),
subject: "Re:Blah",
text: "blah blah blah blah",
priority: true
}
var email_05 = {
sender: "mary@example.com",
receipient: "kevin@example.com",
// timestamp = Date(),
subject: "Blah",
text: "blah blah blah blah",
priority: false
}
var email_06 = {
sender: "mary@example.com",
receipient: "kevin@example.com",
// timestamp = Date(),
subject: "Blah",
text: "blah blah blah blah",
priority: true
}
var mary = {
name: "Mary",
email: "mary@example.com",
// full_address = function(){
// return this.name + " - " + this.email
// },
phone: "555-555-5555"
}
var george = {
name: "George",
email: "george@example.com",
// full_address = function(){
// return this.name + " - " + this.email
// },
phone: "555-555-5555"
}
var my_email_app = {
name: "Google Inbox, Except Not Really",
version: "3.141592",
manufacturer: "Kevin Incorporated",
user: kevin
mailboxes: [
{ name: "Inbox",
mail: [email_01,email_02] },
{ name: "Sent",
mail: [email_04] },
{ name: "Archive",
mail: [email_05, email_06] },
{ name: "Drafts",
mail: [] },
{ name: "Trash",
mail: [email_03] }
],
contacts = [ mary, george ]
}
console.log(my_email_app.user.name);