2013-04-12 12:31:58 -07:00
|
|
|
/* Copyright 2011-2013 Yorba Foundation
|
2011-09-30 17:29:03 -07:00
|
|
|
*
|
|
|
|
|
* This software is licensed under the GNU Lesser General Public License
|
2013-04-12 12:31:58 -07:00
|
|
|
* (version 2.1 or later). See the COPYING file in this distribution.
|
2011-09-30 17:29:03 -07:00
|
|
|
*/
|
|
|
|
|
|
2013-03-07 18:08:50 -08:00
|
|
|
public class Geary.ComposedEmail : BaseObject {
|
2012-08-30 17:26:40 -07:00
|
|
|
public const string MAILTO_SCHEME = "mailto:";
|
|
|
|
|
|
2012-01-17 18:42:20 -08:00
|
|
|
public const Geary.Email.Field REQUIRED_REPLY_FIELDS =
|
|
|
|
|
Geary.Email.Field.HEADER
|
|
|
|
|
| Geary.Email.Field.BODY
|
|
|
|
|
| Geary.Email.Field.ORIGINATORS
|
|
|
|
|
| Geary.Email.Field.RECEIVERS
|
2012-01-30 18:20:57 -08:00
|
|
|
| Geary.Email.Field.REFERENCES
|
2012-01-17 18:42:20 -08:00
|
|
|
| Geary.Email.Field.SUBJECT
|
2012-06-01 11:42:04 -07:00
|
|
|
| Geary.Email.Field.DATE;
|
2012-01-17 18:42:20 -08:00
|
|
|
|
2011-09-30 17:29:03 -07:00
|
|
|
public DateTime date { get; set; }
|
2011-10-07 17:33:34 -07:00
|
|
|
public RFC822.MailboxAddresses from { get; set; }
|
|
|
|
|
public RFC822.MailboxAddresses? to { get; set; default = null; }
|
|
|
|
|
public RFC822.MailboxAddresses? cc { get; set; default = null; }
|
|
|
|
|
public RFC822.MailboxAddresses? bcc { get; set; default = null; }
|
2013-03-08 14:54:59 -08:00
|
|
|
public string? in_reply_to { get; set; default = null; }
|
2012-01-17 18:42:20 -08:00
|
|
|
public Geary.Email? reply_to_email { get; set; default = null; }
|
2013-03-08 14:54:59 -08:00
|
|
|
public string? references { get; set; default = null; }
|
|
|
|
|
public string? subject { get; set; default = null; }
|
|
|
|
|
public string? body_text { get; set; default = null; }
|
|
|
|
|
public string? body_html { get; set; default = null; }
|
2012-04-12 13:27:35 -07:00
|
|
|
public string? mailer { get; set; default = null; }
|
2012-06-25 11:12:57 -07:00
|
|
|
public Gee.Set<File> attachment_files { get; private set;
|
|
|
|
|
default = new Gee.HashSet<File>(File.hash, (EqualFunc) File.equal); }
|
2011-09-30 17:29:03 -07:00
|
|
|
|
2012-01-20 17:31:56 -08:00
|
|
|
public ComposedEmail(DateTime date, RFC822.MailboxAddresses from,
|
2012-04-24 18:28:45 -07:00
|
|
|
RFC822.MailboxAddresses? to = null, RFC822.MailboxAddresses? cc = null,
|
2013-03-08 14:54:59 -08:00
|
|
|
RFC822.MailboxAddresses? bcc = null, string? subject = null,
|
|
|
|
|
string? body_text = null, string? body_html = null) {
|
2011-09-30 17:29:03 -07:00
|
|
|
this.date = date;
|
|
|
|
|
this.from = from;
|
2012-01-20 17:31:56 -08:00
|
|
|
this.to = to;
|
2012-04-24 18:28:45 -07:00
|
|
|
this.cc = cc;
|
|
|
|
|
this.bcc = bcc;
|
|
|
|
|
this.subject = subject;
|
2013-01-16 11:22:33 -08:00
|
|
|
this.body_text = body_text;
|
|
|
|
|
this.body_html = body_html;
|
2011-09-30 17:29:03 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|