LATEST VERSION 1.5 (17.03.2015)


UMail is an UObject created to send and receive emails. With this module you will be able to send and receive emails to many recipients, add and save attachments, etc. This module is based on cURL library and utilizes Secure Sockets Layer (SSL) connection. cURL is a computer software project providing a library for transferring data using various protocols.

The module allows you to send your own custom code HTML email. It automatically creates a plain-text version of your HTML code, and also works alongside internet service providers (ISPs) and anti-spam groups to ensure the best delivery possible. Multipart/Alternative MIME format sends both the HTML and plain-text versions of an email. When a recipient receives your email, their email client will automatically determine which format to display.

UMail is using UTF-8 encoding and was tested with a Gmail account.


UMail was compiled with all the shared libraries (all included in package - "DLL" folder). Copy them to the uobjects folder or set path in system environment variable (PATH).

  • libcurl.dll
  • libiconv.dll
  • libebay32.dll
  • ssleay32.dll

You can also download all the precompiled files here (cURL, OpenSSL, libconv).

See UMail in action

Module functions

Main functions"smtp_address:smtp_port", "imap_address:pop3_port", "login", "password"); - set up a mail client,
UMail.debug - if set to 1, displays execution information in the console.

Sending functions

UMail.sendFrom("I Robot"); - set sender name,
UMail.sendTo(["address1","address2",...]); - set a recipient list,
UMail.sendCc(["address3","address4",...]); - set a carbon copy recipient list,
UMail.sendBcc(["address5","address6",...]); - set a blind carbon copy recipient list,
UMail.sendSubject("text"); - set subject,
UMail.sendContent("text"); - set content (you can use html tags, even links to attachments),
UMail.sendAttachment(["file1","file2",...]); - add attachments (set a path and name of attached file),
UMail.sendAttachmentID(["file1_ID","file2_ID",...]); - set attachment IDs (see example 2),
bool = UMail.Send(); - perform a sending process, return false if any problem occurs inside the module (check console information).

Receiving functions

bool = Umail.Check(); - check new (unread) emails, returns false if any problem occurs (check console information),
bool = UMail.SaveAttachments("path/to/save/"); - save attachemnts of the received email, returns false if any problem occurs (check console information).
["ID1","ID2",...,"IDn"] = UMail.receiveID; - a number of new emails on the user's inbox folder,

bool = UMail.Receive("IDx"); - download email for given ID, return false if any problem occurs (check console information),
"sender name" = UMail.receiveFrom; - get sender name,
["recipient1","recipient2",...] = UMail.receiveTo; - get main recipient list,
["recipient1","recipient2",...] = UMail.receiveCc; - get carbon copy recipient list,
"subject" = UMail.receiveSubject; - get subject,
"Thu, 29 Jan 2015 20:45:24 +0100" = UMail.receiveDate; - get date of email,
"Content" = UMail.receiveContent; - get plain text content of email,
"Content" = UMail.receiveContentHTML; - get HTML content of email,
["attachment1", "attachment2",...] = UMail.receiveAttachment; - get attachment list.

Urbiscript examples

Example 1

var Global.mail="smtp://","imaps://","login[at]","password");
mail.sendFrom("My Robot");
mail.sendSubject("Mail from My Robot!");
mail.sendContent("Best regards from My Robot.<br> Check attachment.<br><br><b><i>My Robot</b></i>");
if (mail.receivedAttachment.size > 0) mail.SaveAttachments("path/");

Example 2

mail.sendContent("<img src="cid:ID_XXX_XXX"></img><br><br><b><i>My Robot</b></i>");





EMYS and FLASH are Open Source and distributed according to the GPL v2.0 © Rev. 0.8.0, 27.04.2016

FLASH Documentation