User Tools

Site Tools


uphp:library_functions:smtp_mail

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

uphp:library_functions:smtp_mail [2021/04/12 03:14]
admin created
uphp:library_functions:smtp_mail [2021/09/13 05:57]
Line 1: Line 1:
-======smtp_mail====== 
- 
-<badge>WattmonOS 3.12+</badge> 
- 
-Send an email using a raw socket over SMTP 
- 
-====Library==== 
- 
-<html><pre><span style="font-size:125%;color:green">/lib/uphp/stmp.inc</span></pre></html> 
- 
-====Description==== 
- 
-<well size="sm"><html> 
-<span style="font-size:125%;color:green"> 
-<span style="color:black">smtp_mail ( 
-<span style="color:green">string 
-<span style="color:blue">$to 
-<span style="color:black">, 
-<span style="color:green">string 
-<span style="color:blue">$from 
-<span style="color:black">, 
-<span style="color:green">string 
-<span style="color:blue">$subject 
-<span style="color:black">, 
-<span style="color:green">string 
-<span style="color:blue">$message 
-<span style="color:black">, 
-<span style="color:green">string 
-<span style="color:blue">$user 
-<span style="color:black">, 
-<span style="color:green">string 
-<span style="color:blue">$password 
-<span style="color:black">, 
-<span style="color:green">string 
-<span style="color:blue">$host 
-<span style="color:black">, 
-<span style="color:green">int 
-<span style="color:blue">$port 
-<span style="color:black"> 
-) 
-</html></well> 
- 
-This function will send an email using the SMTP Server settings that you pass to the function.  You can use port 465 / 587 for SSL/TLS. 
- 
-====Parameters==== 
- 
-<html><b><span style="color:blue">$to<span style="color:black"></b></html>: Recipient email id 
- 
-<html><b><span style="color:blue">$from<span style="color:black"></b></html>: Sender email id 
- 
-<html><b><span style="color:blue">$subject<span style="color:black"></b></html>: Email subject 
- 
-<html><b><span style="color:blue">$message<span style="color:black"></b></html>: Email message contents 
- 
-<html><b><span style="color:blue">$user<span style="color:black"></b></html>: SMTP user id 
- 
-<html><b><span style="color:blue">$password<span style="color:black"></b></html>: SMTP password 
- 
-<html><b><span style="color:blue">$host<span style="color:black"></b></html>: SMTP Server hostname 
- 
-<html><b><span style="color:blue">$port<span style="color:black"></b></html>: SMTP Server port 
- 
-====Return Values==== 
- 
-<html><b><span style="color:blue">int</span></b></html> - 1 if successful or else the SMTP error code 
- 
  
uphp/library_functions/smtp_mail.txt · Last modified: 2021/09/13 05:57 (external edit)