Skip to content

Tanziha-Sheikh/email-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

email-php

Send e-mail with php.

Config

Change this lines with yours configurations.

$mail->SMTPSecure = 'tls';
$mail->Port = '587';
$mail->Host = 'smtp.domain.com';
$mail->Username = '[email protected]';
$mail->Password = 'password';

Usage

POST /email-php/php/email/send/ HTTP/1.1
Host: localhost
Content-Type: application/json
Cache-Control: no-cache
{
    "from": {
        "name": "xxxxx",
        "email": "[email protected]"
    },
    "address": [{
        "name": "yyyyy",
        "email": "[email protected]"
    }, {
        "name": "zzzzz",
        "email": "[email protected]"
    }],
    "title": "Email php",
    "msg": "Hello email php."
}

Result

Success

{
    "result": true
}

Error

{
    "result": "SMTP Error: Could not authenticate."
}

About

Send e-mail with php.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 87.3%
  • CSS 8.6%
  • JavaScript 3.3%
  • HTML 0.8%