Overview
  Next

EmailSender uses Pocket Outlook to send email messages.
The messages are sent using one of the existing accounts.
When you send a message the message is actually added to the Outbox folder. If there is a valid connection the message is sent, otherwise the message will stay in the Outbox folder until a connection is created.
This feature is useful in cases where the device is not always connected.

Example:
'EmailSender is an EmailSender object and Message is a Message object.
Sub Globals
      Dim accounts(0) as String
End Sub

Sub App_Start
      Form1.Show
      EmailSender.New1
      Accounts() = EmailSender.GetAccounts 'Returns the names of all the accounts.
      s = "Accounts list: "
      For i = 0 to ArrayLen(Accounts()) - 1
            s = s & crlf & Accounts(i)
      Next
      Msgbox(s)
      Message.New1
      Message.Subject = "Hello World!!!"
      Message.AddTo("[email protected]") 'Adds an address to the "To" field.
      Message.AddAttachment(AppPath & "\some file.txt") 'Adds an attachment.
      EmailSender.Send("Form1",accounts(0),Message.Value) 'Sends the message using the first account.
End Sub