-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconf.js
132 lines (87 loc) · 3.97 KB
/
conf.js
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
exports.config = {
directConnect: true,
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
cucumberOpts: {
require: [
'./chapter10_steps.js',
'./env.js'
]
},
specs: [
'./chapter10.feature'
],
onPrepare: function () {
browser.driver.manage().window().maximize();
},
}
// var MailListener = require("mail-listener2");
// var mailListener = new MailListener({
// username: "[email protected]",
// password: "Aasim_ali92",
// host: "imap.gmail.com",
// port: 993, // imap port
// tls: true,
// connTimeout: 10000, // Default by node-imap
// authTimeout: 5000, // Default by node-imap,
// debug: console.log, // Or your custom function with only one incoming argument. Default: null
// tlsOptions: { rejectUnauthorized: false },
// mailbox: "INBOX", // mailbox to monitor
// searchFilter: ["UNSEEN", "FLAGGED"], // the search filter being used after an IDLE notification has been retrieved
// markSeen: true, // all fetched email willbe marked as seen and not fetched next time
// fetchUnreadOnStart: true, // use it only if you want to get all unread email on lib start. Default is `false`,
// mailParserOptions: {streamAttachments: true}, // options to be passed to mailParser lib.
// attachments: true, // download attachments as they are encountered to the project directory
// attachmentOptions: { directory: "attachments/" } // specify a download directory for attachments
// });
// mailListener.start(); // start listening
// // stop listening
// //mailListener.stop();
// mailListener.on("server:connected", function(){
// console.log("imapConnected 1 >>>> ");
// });
// mailListener.on("server:disconnected", function(){
// console.log("imapDisconnected 2 >>>");
// });
// mailListener.on("error", function(err){
// console.log(err);
// });
// mailListener.on("mail", function(mail, seqno, attributes){
// console.log("imapDisconnected 3 >>>");
// // do something with mail object including attachments
// //console.log("emailParsed", mail);
// // mail processing code goes here
// });
// mailListener.on("attachment", function(attachment){
// // console.log(attachment.path);
// console.log("imapDisconnected 4 >>>");
// });
// it's possible to access imap object from node-imap library for performing additional actions. E.x.
//mailListener.imap.move(:msguids, :mailboxes, function(){})
// var MailListener = require("mail-listener2");
// // here goes your email connection configuration
// var mailListener = new MailListener({
// username: "[email protected]",
// password: "Aasim_ali92",
// host: "imap.gmail.com",
// port: 993, // imap port
// tls: true,
// tlsOptions: { rejectUnauthorized: false },
// mailbox: "INBOX", // mailbox to monitor
// searchFilter: ["UNSEEN", "FLAGGED"], // the search filter being used after an IDLE notification has been retrieved
// markSeen: true, // all fetched email willbe marked as seen and not fetched next time
// fetchUnreadOnStart: true, // use it only if you want to get all unread email on lib start. Default is `false`,
// mailParserOptions: { streamAttachments: true }, // options to be passed to mailParser lib.
// attachments: true, // download attachments as they are encountered to the project directory
// attachmentOptions: { directory: "C:/Users/aasim/Desktop/Reports/HTMLREPORT/report/indexxx.html" } // specify a download directory for attachments
// });
// mailListener.start();
// mailListener.on("server:connected", function () {
// console.log("Mail listener initialized");
// });
// global.mailListener = mailListener;
// },
// onCleanUp: function () {
// mailListener.stop();
// }
//};