https://github.com/sinhapaurush/gmail
Send Mail via a GMAIL account in TMINC PHP EXTENSION.
https://github.com/sinhapaurush/gmail
Last synced: 11 months ago
JSON representation
Send Mail via a GMAIL account in TMINC PHP EXTENSION.
- Host: GitHub
- URL: https://github.com/sinhapaurush/gmail
- Owner: sinhapaurush
- Created: 2021-04-21T04:50:49.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-04-24T02:25:44.000Z (almost 3 years ago)
- Last Synced: 2025-02-12T07:25:49.800Z (about 1 year ago)
- Language: PHP
- Size: 69.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# GMAIL
Send Mail via a GMAIL account in TMINC PHP EXTENSION.
Import this Library on the Page where you want to use it by PHP EXTENSION meta() function.
Open string.php file in root directory and
Define variables as of below.
```php
$gmail_username = "-- YOUR GMAIL ID --";
$gmail_password = "-- YOUR GMAIL PASSWORD --";
$gmail_from = "-- SET FROM MAIL --";
```
FROM MAIL: This will be visible to mail recievers af "From" mail.
#How to send Mail?
After importing, use `gmail()` function to send mail.
Parameters in gmail()
```php
gmail("--TO / RECIEVERS E-MAIL ADDRESS --", "-- MAIL SUBJECT --", "-- MAIL BODY (Can accept HTML)--");
```
If Mail is sent, this function will return true, if mail is not sent due to some reason, this function will return false so that you can use it like normal mail() funtion.
for eg:
```php
if (gmail($to, $subject, $body)){
echo "Mail Sent";
}else{
echo "Mail Not sent";
}
```
You can delete this file, if you know how to use this Library.