Difference between revisions of "Function mail()"

From wiki.netio-products.com
Jump to navigation Jump to search
(Usage)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:function mail()}}
 
{{DISPLAYTITLE:function mail()}}
Send SMTP mail.
+
Send SMTP mail. Don't forget to set SMTP server in Settings → E-mail in Netio web interface.
  
  <i>nil</i> mail(string <u>recipient</u>, string <u>subject</u>, string <u>body</u>)
+
  <i>nil</i> <b>mail</b>(<i>string</i> <code>recipient</code>, <i>string</i> <code>subject</code>, <i>string</i> <code>body</code>)
  
 
=== Parameters ===
 
=== Parameters ===
<i>string</i> <u>recipient</u> - e-mail address of the recipient (To)
+
* <i>string</i> <code>recipient</code> - e-mail address of the recipient (To)
<i>string</i> <u>subject</u> subject of the e-mail
+
* <i>string</i> <code>subject</code> subject of the e-mail
<i>string</i> <u>body</u> body of the e-mail
+
* <i>string</i> <code>body</code> body of the e-mail
  
 
=== Return value ===
 
=== Return value ===

Latest revision as of 12:09, 25 April 2017

Send SMTP mail. Don't forget to set SMTP server in Settings → E-mail in Netio web interface.

nil mail(string recipient, string subject, string body)

Parameters

  • string recipient - e-mail address of the recipient (To)
  • string subject subject of the e-mail
  • string body body of the e-mail

Return value

nil

Usage

-- sends HTTP GET request
mail("johndoe@example.com","Socket S0732 warning","Warning: S0732 consumption exceeded 10kWh.")