-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSendMails.java
More file actions
35 lines (26 loc) · 906 Bytes
/
SendMails.java
File metadata and controls
35 lines (26 loc) · 906 Bytes
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
package emailClient;
import java.io.Serializable;
import java.util.ArrayList;
public class SendMails extends emailClient{
private String str;
public SendMails(String send_email) throws Exception {
str=send_email;
method();
}
public SendMails() {
}
private void method() throws Exception {
String[] parts = str.split(",");
String emailaddress = parts[0];
String subject = parts[1];
String content = parts[2];
JavaMail javamail = new JavaMail(emailaddress,subject,content);
//create a mail object
mail Mail = new mail(emailaddress,subject,content);
arr.add(Mail); // add all the mail objects to the array to store data of all the mails send on today.
//System.out.println(arr.size());
}
public void print() {
System.out.println("Mail sent successfully");
}
}