public class Email extends BasicSense
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_EMAIL |
static java.lang.String |
SIGNATURE |
static int |
SLEEP |
static int |
TIMEOUT |
conversations, DAY, DEFAULT_SPEAKER, engaged, HOUR, MAX_FILE_SIZE, MINUTE, RETRY
Constructor and Description |
---|
Email() |
Modifier and Type | Method and Description |
---|---|
void |
checkEmail()
Check the inbox for new messages, and process each message.
|
void |
connect()
Connect and verify the email settings.
|
javax.mail.Session |
connectSession() |
javax.mail.Store |
connectStore() |
javax.mail.Store |
connectStoreSSL() |
void |
email(Vertex source,
Vertex replyTo,
Vertex subject,
Vertex message) |
java.lang.String |
getEmailAddress() |
int |
getEmails() |
int |
getEmailsProcessed() |
java.lang.String |
getFrom(javax.mail.Message message) |
java.util.List<java.lang.String> |
getInbox()
Return a list in inbox message headers.
|
java.lang.String |
getIncomingHost() |
int |
getIncomingPort() |
int |
getMaxEmails() |
java.lang.String |
getOutgoingHost() |
int |
getOutgoingPort() |
java.lang.String |
getPassword() |
java.lang.String |
getProtocol() |
java.lang.String |
getRecipient(javax.mail.Message message) |
java.util.List<java.lang.String> |
getSent()
Return a list in inbox message headers.
|
java.lang.String |
getSignature() |
java.lang.String |
getUsername() |
void |
initProperties()
Load settings.
|
void |
input(java.lang.Object input,
Network network)
Process the email message.
|
void |
inputSentence(java.lang.String text,
java.lang.String subject,
java.lang.String userName,
java.lang.String targetUserName,
javax.mail.Message message,
Network network)
Process the text sentence.
|
boolean |
isSSLRequired() |
void |
migrateProperties()
Migrate to new properties system.
|
void |
output(Vertex output)
Output the email reply.
|
void |
saveProperties() |
void |
sendEmail(java.lang.String text,
java.lang.String subject,
java.lang.String replyTo)
Send the email reply.
|
void |
setEmailAddress(java.lang.String emailAddress) |
void |
setEmails(int emails) |
void |
setEmailsProcessed(int emailsProcessed) |
void |
setIncomingHost(java.lang.String incomingHost) |
void |
setIncomingPort(int incomingPort) |
void |
setIsEnabled(boolean isEnabled)
Allow the sense to disabled/enabled.
|
void |
setMaxEmails(int maxEmails) |
void |
setOutgoingHost(java.lang.String outgoingHost) |
void |
setOutgoingPort(int outgoingPort) |
void |
setPassword(java.lang.String password) |
void |
setProtocol(java.lang.String protocol) |
void |
setSignature(java.lang.String signature) |
void |
setSSLRequired(boolean isSSLRequired) |
void |
setUsername(java.lang.String username) |
void |
startCheckingEmail() |
addListener, awake, checkEngaged, checkSentence, discover, discoverSentence, getAction, getBot, getEmotionalState, getLanguageState, getListeners, getName, getPrimitive, getResponseListener, getShortTermMemory, initialize, input, isEnabled, log, log, log, notifyExceptionListeners, notifyResponseListener, pool, printInput, removeListener, setAction, setBot, setEmotionalState, setLanguageState, setName, setResponseListener, shutdown, toString
public static int SLEEP
public static java.lang.String SIGNATURE
public static java.lang.String DEFAULT_EMAIL
public static int TIMEOUT
public void migrateProperties()
migrateProperties
in interface Sense
migrateProperties
in class BasicSense
public void initProperties()
public void saveProperties()
saveProperties
in interface Sense
saveProperties
in class BasicSense
public void setIsEnabled(boolean isEnabled)
BasicSense
setIsEnabled
in interface Sense
setIsEnabled
in class BasicSense
public void startCheckingEmail()
public javax.mail.Store connectStore() throws javax.mail.MessagingException
javax.mail.MessagingException
public javax.mail.Store connectStoreSSL() throws javax.mail.MessagingException
javax.mail.MessagingException
public void checkEmail()
public void connect()
public java.util.List<java.lang.String> getInbox()
public java.util.List<java.lang.String> getSent()
public javax.mail.Session connectSession()
public void sendEmail(java.lang.String text, java.lang.String subject, java.lang.String replyTo)
public java.lang.String getRecipient(javax.mail.Message message) throws javax.mail.MessagingException
javax.mail.MessagingException
public java.lang.String getFrom(javax.mail.Message message) throws javax.mail.MessagingException
javax.mail.MessagingException
public void input(java.lang.Object input, Network network) throws java.lang.Exception
input
in interface Sense
input
in class BasicSense
java.lang.Exception
public void output(Vertex output)
output
in interface Sense
output
in class BasicSense
public java.lang.String getSignature()
public void setSignature(java.lang.String signature)
public java.lang.String getEmailAddress()
public void setEmailAddress(java.lang.String emailAddress)
public java.lang.String getIncomingHost()
public void setIncomingHost(java.lang.String incomingHost)
public int getIncomingPort()
public void setIncomingPort(int incomingPort)
public java.lang.String getOutgoingHost()
public void setOutgoingHost(java.lang.String outgoingHost)
public int getOutgoingPort()
public void setOutgoingPort(int outgoingPort)
public java.lang.String getUsername()
public void setUsername(java.lang.String username)
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public java.lang.String getProtocol()
public void setProtocol(java.lang.String protocol)
public boolean isSSLRequired()
public void setSSLRequired(boolean isSSLRequired)
public int getMaxEmails()
public void setMaxEmails(int maxEmails)
public int getEmails()
public void setEmails(int emails)
public int getEmailsProcessed()
public void setEmailsProcessed(int emailsProcessed)
public void inputSentence(java.lang.String text, java.lang.String subject, java.lang.String userName, java.lang.String targetUserName, javax.mail.Message message, Network network) throws javax.mail.MessagingException
javax.mail.MessagingException