/

 

The manual

Self-training

Experimentation

Contact

 

Language

Automatic processing of received emails

Warning: in Storga, an email corresponds to a message received. A sent email is called a message and processed through another set of functions.

Browse and organize received emails

Browse the different emails received in a page or a sheet

each_mail
  ...

each_mail sheet
  ...

Access the different parts of a received email

Get the date:

var DateTime dt := mail_date

Obtain the sender's email address:

var Str s := mail_from

Obtain the email addresses of the recipients (if there are several, they will be separated by newlines):

var Str s := mail_to

Obtain the email address of people in copy:

var Str s := mail_cc

Get the subject of the current email:

var Str s := mail_subject

Obtain the content of the email header, in non-decoded form:

var Str s := mail_header

Get the content of the body of the email, in text form:

var Str s := mail_body

Browse the various attached files:

each_attached f
  ...

The parameter, here 'f', is used to identify the file in order to be able to use the various file manipulation functions of Storga.

Add additional information to the email

Obtain the summary associated with the current email:

var Str s := mail_resume

Change the summary:

mail_resume := "Nouveau résumé"

Determine if the email has been marked as SPAM:

if mail_spam
  ...

Mark the email as SPAM, or not:

mail_spam := true

Automatically organize received emails

Move the current received email

move_mail ...

The position options usable by 'move_mail' are the same as those usable by 'new_form'.

Delete the current received email

delete_mail