The mail component is responsible for sending email to and receiving email an email server. In most cases, the mail component does its work in a background process. For example, when a user sends email to someone, the “request” to send a message is queued to be sent later. (There is usually no reason for the end-user to be present while the Tolven server attempts to contact the email server).
Receiving an email on behalf of a Tolven user means that the message will need to be stored and made available for a Tolven user to see at some point later.
The Tolven Mail component uses JavaMail to interact with external mail servers. Java Mail depends on several properties to be set in order to connect to a mail server.
Several properties control how JavaMail operates. The following are some common properties.
|mail.smtp.host||smtp.bizmail.yahoo.com||The address of your SMTP server|
|mail.transport.protocol||smtp (or smpts)||The actual protocol, which in this case is smtp. If the protocol is
|mail.smtp.starttls.enable||true||If available, either SSL or TLS will be chosen by the mail stmp(s) server|
|mail.smtp.auth||true||If the server requires authentication or not. Many public servers now require authentication.|
|mail.debug||false||To get a bunch of log file chatter when establishing a mail connection and sending a message|
|tolven.mail.read.frequency||300||number of seconds to wait between polls of the mail server. If this value is zero, messages will not be read by Tolven.|
|firstname.lastname@example.org||The from address of the email|
|tolven.mail.fromName||My Company||The name of your business or agency|
|email@example.com||The username under which the mail will be sent|
|tolven.mail.password||mypassword||If mail.smtp.auth=true, the password of the account sending the mail|
Talking to a mail server that requires SSL
The gmail mail server, for example, requires that the mail client talk to it via TLS on port 587. The JavaMail configuration should therefore look something like this:
mail.transport.protocol=smtp mail.smtp.host=smtp.gmail.com mail.smtp.auth=true mail.smtp.port=587
Sending a message
Receiving a message
A Tolven daemon will wake up periodically and check for new messages. Messages are processed one-at-a-time from the server. That is, one message is read and removed from the mail server and added to Tolven. Therefore, if Tolven gets behind in processing mail, the unprocessed mail will remain on the mail server.
All messages sent to the Tolven account.