Example

Top  Previous  Next

Example to use mail function

 

// It creates an email to send to info@acme.com address

OneMail:=MailCreate('Acme Srl','info@acme.com','Test message','Hello world !',False);

 

//It adds a file

MailAddFile(OneMail,'c:\autoexec.bat');

 

// sent an email

if MailSend(OneMail,'acmeaccount','mail.acme.com','dest@destserver.com')

// se la mail viene inviata correttamente visualizza un messaggio

then ShowMessage('Mail is sent !');

//It destroys the mail

MailDestroy(OneMail);

 

Notes

 

To use this example have to substitute the existing file and mail address.