From 5ae16f1369b0d5254cb86c362a6f9bf1ccd2cebf Mon Sep 17 00:00:00 2001 From: rogarfil Date: Sat, 26 Dec 2020 22:22:46 -0300 Subject: [PATCH 1/6] Commit Initial --- .gitignore | 198 +++++++++++++++++++++++++++++++++++++++++++++++++ _app/Email.php | 41 ++++++++++ composer.json | 26 +++++++ composer.lock | 95 ++++++++++++++++++++++++ index.php | 12 +++ 5 files changed, 372 insertions(+) create mode 100644 .gitignore create mode 100644 _app/Email.php create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 index.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9986dee --- /dev/null +++ b/.gitignore @@ -0,0 +1,198 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/windows,linux,macos,phpstorm,netbeans,composer +# Edit at https://www.toptal.com/developers/gitignore?templates=windows,linux,macos,phpstorm,netbeans,composer + +### Composer ### +composer.phar +/lib_ext/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# composer.lock + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### NetBeans ### +**/nbproject/private/ +**/nbproject/Makefile-*.mk +**/nbproject/Package-*.bash +build/ +nbbuild/ +dist/ +nbdist/ +.nb-gradle/ + +### PhpStorm ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/ +.idea +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### PhpStorm Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ + +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/windows,linux,macos,phpstorm,netbeans,composer \ No newline at end of file diff --git a/_app/Email.php b/_app/Email.php new file mode 100644 index 0000000..0d70ed0 --- /dev/null +++ b/_app/Email.php @@ -0,0 +1,41 @@ +mail = new PHPMailer(true); + $this->mail->SMTPDebug = 2; // Enable verbose debug output + $this->mail->isSMTP(); // Send using SMTP + $this->mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through + $this->mail->SMTPAuth = true; // Enable SMTP authentication + $this->mail->Username = 'rogarfil@rogarfil.com.br'; // SMTP username + $this->mail->Password = 'TNTZ8QHX'; // SMTP password + $this->mail->SMTPSecure = 'tls'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged + $this->mail->Port = 587; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above + $this->mail->CharSet = 'utf-8'; + $this->mail->setLanguage('br'); + $this->mail->isHTML(true); + $this->mail->setFrom('rogarfil@gmail.com', 'Equipe Gmail'); + } + + public function sendMail($subject, $body, $replyEmail, $replayName, $addressEmail, $addressName) { + $this->mail->Subject = (string)$subject; + $this->mail->Body = $body; + + $this->mail->addReplyTo($replyEmail, $replayName); + $this->mail->addAddress($addressEmail, $addressName); + + try { + $this->mail->send(); + } catch (Exception $e) { + echo "Erro ao enviar o e-mail: {$this->mail->ErrorInfo} {$e->getMessage()}"; + } + } +} \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..d1234b7 --- /dev/null +++ b/composer.json @@ -0,0 +1,26 @@ +{ + "name": "rogar/notification", + "description": "This is a library that uses composer as the basis for generating email notifications", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "rogarfil", + "email": "rogarfil@yahoo.com.br", + "homepage": "http://www.rogarfil.com.br", + "role": "Developer" + } + ], + "minimum-stability": "dev", + "require": { + "phpmailer/phpmailer": "6.2.0" + }, + "config": { + "vendor-dir": "lib_ext" + }, + "autoload": { + "psr-4": { + "Notification\\": "_app" + } + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..dd500b2 --- /dev/null +++ b/composer.lock @@ -0,0 +1,95 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "8097695f5759f9e2fd6f25aa131a0bd2", + "packages": [ + { + "name": "phpmailer/phpmailer", + "version": "v6.2.0", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "e38888a75c070304ca5514197d4847a59a5c853f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e38888a75c070304ca5514197d4847a59a5c853f", + "reference": "e38888a75c070304ca5514197d4847a59a5c853f", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.2", + "phpcompatibility/php-compatibility": "^9.3.5", + "roave/security-advisories": "dev-latest", + "squizlabs/php_codesniffer": "^3.5.6", + "yoast/phpunit-polyfills": "^0.2.0" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-only" + ], + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "support": { + "issues": "https://github.com/PHPMailer/PHPMailer/issues", + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.2.0" + }, + "funding": [ + { + "url": "https://github.com/Synchro", + "type": "github" + } + ], + "time": "2020-11-25T15:24:57+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/index.php b/index.php new file mode 100644 index 0000000..b744f70 --- /dev/null +++ b/index.php @@ -0,0 +1,12 @@ +sendMail("Assunto de Teste", "

Esse é um e-mail de teste!

", "rogarfil@gmail.com", "Gmail Mandou", "rogarfil@yahoo.com.br", "Rogarfil"); + +var_dump($novoEmail); \ No newline at end of file From 49eb750ab39bcde2460b4fa6430ee3242d3fcd3d Mon Sep 17 00:00:00 2001 From: rogarfil Date: Sat, 26 Dec 2020 23:09:30 -0300 Subject: [PATCH 2/6] Set README.md --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index beca008..809fc08 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,44 @@ -# notification -This is a library that uses composer as the basis for generating email notifications +# Notification library via email using phpMailer + +This library has the function of sending e-mail using the phpmailer library. Doing this in an uncomplicated way is essential for any system. + +To install the library, run the following command: + +``` sh +composer require gustavoweb/composer_teste +``` + +To use the library, simply require the composer to autoload, invoke the class and call the method: + +``` sh + sendEmail ("Subject", "Content", "reply@email.com", "Replay Name", "address@email.com", "Address Name"); +``` + +Note that the entire configuration of sending the email is using the magic method builder! Once the builder method has been invoked within your application, your system will be able to take the shots. + +### Developers +* [Gustavo Web] - Developer of this library and tutor of the Composer na Prática course! +* [Robson V. Leite] - CEO and Founder UpInside Trainamentos +* [UpInside Treinamentos] - Official website of your digital marketing and programming school +* [phpMailer] - Lib to send E-mail + +License +---- + +MIT + +** Another UpInside Training course, make good use of it! ** + +[//]: # +[Gustavo Web]: +[Robson V. Leite]: +[UpInside Treinamentos]: +[phpMailer]: \ No newline at end of file From b4ff8ea41bebb42c2dc74f0a0e5e304a78aaaca4 Mon Sep 17 00:00:00 2001 From: rogarfil Date: Sun, 27 Dec 2020 21:43:53 -0300 Subject: [PATCH 3/6] Commit Final --- _app/Email.php | 26 ++++++++++++++------------ composer.json | 2 +- composer.lock | 28 +++++++++------------------- index.php | 2 +- 4 files changed, 25 insertions(+), 33 deletions(-) diff --git a/_app/Email.php b/_app/Email.php index 0d70ed0..9770186 100644 --- a/_app/Email.php +++ b/_app/Email.php @@ -5,31 +5,33 @@ use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; -class Email { - +class Email +{ private $mail = \stdClass::class; - public function __construct() { + public function __construct() + { $this->mail = new PHPMailer(true); - $this->mail->SMTPDebug = 2; // Enable verbose debug output + $this->mail->SMTPDebug = 2; // Enable verbose debug output $this->mail->isSMTP(); // Send using SMTP - $this->mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through + $this->mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through $this->mail->SMTPAuth = true; // Enable SMTP authentication - $this->mail->Username = 'rogarfil@rogarfil.com.br'; // SMTP username - $this->mail->Password = 'TNTZ8QHX'; // SMTP password - $this->mail->SMTPSecure = 'tls'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged + $this->mail->Username = 'rogarfil@gmail.com'; // SMTP username + $this->mail->Password = '2r0g1f3!@'; // SMTP password + $this->mail->SMTPSecure = 'tls'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged $this->mail->Port = 587; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above $this->mail->CharSet = 'utf-8'; $this->mail->setLanguage('br'); $this->mail->isHTML(true); - $this->mail->setFrom('rogarfil@gmail.com', 'Equipe Gmail'); + $this->mail->setFrom('canutampp@gmail.com', 'Equipe GustavoWeb'); } - public function sendMail($subject, $body, $replyEmail, $replayName, $addressEmail, $addressName) { + public function sendMail($subject, $body, $replyEmail, $replyName, $addressEmail, $addressName) + { $this->mail->Subject = (string)$subject; $this->mail->Body = $body; - $this->mail->addReplyTo($replyEmail, $replayName); + $this->mail->addReplyTo($replyEmail, $replyName); $this->mail->addAddress($addressEmail, $addressName); try { @@ -38,4 +40,4 @@ public function sendMail($subject, $body, $replyEmail, $replayName, $addressEmai echo "Erro ao enviar o e-mail: {$this->mail->ErrorInfo} {$e->getMessage()}"; } } -} \ No newline at end of file +} diff --git a/composer.json b/composer.json index d1234b7..45c3061 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ], "minimum-stability": "dev", "require": { - "phpmailer/phpmailer": "6.2.0" + "phpmailer/phpmailer": "6.1.4" }, "config": { "vendor-dir": "lib_ext" diff --git a/composer.lock b/composer.lock index dd500b2..da8fef3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,35 +4,31 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8097695f5759f9e2fd6f25aa131a0bd2", + "content-hash": "e529c1e23b142ce0daa64236a726a272", "packages": [ { "name": "phpmailer/phpmailer", - "version": "v6.2.0", + "version": "v6.1.4", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "e38888a75c070304ca5514197d4847a59a5c853f" + "reference": "c5e61d0729507049cec9673aa1a679f9adefd683" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e38888a75c070304ca5514197d4847a59a5c853f", - "reference": "e38888a75c070304ca5514197d4847a59a5c853f", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c5e61d0729507049cec9673aa1a679f9adefd683", + "reference": "c5e61d0729507049cec9673aa1a679f9adefd683", "shasum": "" }, "require": { "ext-ctype": "*", "ext-filter": "*", - "ext-hash": "*", "php": ">=5.5.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", - "phpcompatibility/php-compatibility": "^9.3.5", - "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.5.6", - "yoast/phpunit-polyfills": "^0.2.0" + "friendsofphp/php-cs-fixer": "^2.2", + "phpunit/phpunit": "^4.8 || ^5.7" }, "suggest": { "ext-mbstring": "Needed to send email in multibyte encoding charset", @@ -72,15 +68,9 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.2.0" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.1.4" }, - "funding": [ - { - "url": "https://github.com/Synchro", - "type": "github" - } - ], - "time": "2020-11-25T15:24:57+00:00" + "time": "2019-12-10T11:17:38+00:00" } ], "packages-dev": [], diff --git a/index.php b/index.php index b744f70..2aff7b3 100644 --- a/index.php +++ b/index.php @@ -7,6 +7,6 @@ //var_dump($email); $novoEmail = new Email; -$novoEmail->sendMail("Assunto de Teste", "

Esse é um e-mail de teste!

", "rogarfil@gmail.com", "Gmail Mandou", "rogarfil@yahoo.com.br", "Rogarfil"); +$novoEmail->sendMail("Assunto de Teste", "

Esse é um e-mail de teste!

", "canutampp@gmail.com", "Gustavo Web", "rogarfil@hotmail.com", "Gustavo"); var_dump($novoEmail); \ No newline at end of file From 5cfa767cec4d91e5f57e840d28b24d5578588146 Mon Sep 17 00:00:00 2001 From: rogarfil Date: Sun, 27 Dec 2020 22:59:05 -0300 Subject: [PATCH 4/6] Library Ok --- _app/Email.php | 20 ++++++++++---------- index.php | 12 ------------ test/index.php | 13 +++++++++++++ 3 files changed, 23 insertions(+), 22 deletions(-) delete mode 100644 index.php create mode 100644 test/index.php diff --git a/_app/Email.php b/_app/Email.php index 9770186..b4471e2 100644 --- a/_app/Email.php +++ b/_app/Email.php @@ -9,21 +9,21 @@ class Email { private $mail = \stdClass::class; - public function __construct() + public function __construct($smtpDebug, $host, $user, $pass, $smtpSecure, $port, $setFromEmail, $setFromName) { $this->mail = new PHPMailer(true); - $this->mail->SMTPDebug = 2; // Enable verbose debug output - $this->mail->isSMTP(); // Send using SMTP - $this->mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through - $this->mail->SMTPAuth = true; // Enable SMTP authentication - $this->mail->Username = 'rogarfil@gmail.com'; // SMTP username - $this->mail->Password = '2r0g1f3!@'; // SMTP password - $this->mail->SMTPSecure = 'tls'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged - $this->mail->Port = 587; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above + $this->mail->SMTPDebug = $smtpDebug; // Enable verbose debug output + $this->mail->isSMTP(); // Send using SMTP + $this->mail->Host = $host; // Set the SMTP server to send through + $this->mail->SMTPAuth = true; // Enable SMTP authentication + $this->mail->Username = $user; // SMTP username + $this->mail->Password = $pass; // SMTP password + $this->mail->SMTPSecure = $smtpSecure; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged + $this->mail->Port = $port; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above $this->mail->CharSet = 'utf-8'; $this->mail->setLanguage('br'); $this->mail->isHTML(true); - $this->mail->setFrom('canutampp@gmail.com', 'Equipe GustavoWeb'); + $this->mail->setFrom($setFromEmail, $setFromName); } public function sendMail($subject, $body, $replyEmail, $replyName, $addressEmail, $addressName) diff --git a/index.php b/index.php deleted file mode 100644 index 2aff7b3..0000000 --- a/index.php +++ /dev/null @@ -1,12 +0,0 @@ -sendMail("Assunto de Teste", "

Esse é um e-mail de teste!

", "canutampp@gmail.com", "Gustavo Web", "rogarfil@hotmail.com", "Gustavo"); - -var_dump($novoEmail); \ No newline at end of file diff --git a/test/index.php b/test/index.php new file mode 100644 index 0000000..5e91679 --- /dev/null +++ b/test/index.php @@ -0,0 +1,13 @@ +sendMail("Assunto de Teste", "

Esse é um e-mail de teste!

", "cxxxxxxxp@gmail.com", "Gustavo Web", "rxxxxxxl@hotmail.com", "Gustavo"); + +var_dump($novoEmail); \ No newline at end of file From 51d1d1a0e44ea44c017b2bc4b62ed7fdb0dd8442 Mon Sep 17 00:00:00 2001 From: rogarfil Date: Mon, 28 Dec 2020 10:58:39 -0300 Subject: [PATCH 5/6] Caminho Json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 45c3061..723d599 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "rogar/notification", + "name": "rogarfil/notification", "description": "This is a library that uses composer as the basis for generating email notifications", "type": "library", "license": "MIT", From c3196ae60865a1d27eeb1ddb9d10496a51b59679 Mon Sep 17 00:00:00 2001 From: rogarfil Date: Mon, 28 Dec 2020 13:45:07 -0300 Subject: [PATCH 6/6] Test fix --- test/index.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/index.php b/test/index.php index 5e91679..19389b4 100644 --- a/test/index.php +++ b/test/index.php @@ -4,10 +4,8 @@ use Notification\Email; -//var_dump($email); +$email = new Email(2, "mail.host.com", "your@email.com", "your-pass", "smtp secure (tls/ssl)", "port (587)", "from@email.com", "From Name"); -$novoEmail = new Email(2, "smtp.gmail.com", "rxxxxxxl@gmail.com", "r1o2g3a4r", "tls", - "587", "cxxxxxxxp@gmail.com", "Equipe Gustavo Web"); -$novoEmail->sendMail("Assunto de Teste", "

Esse é um e-mail de teste!

", "cxxxxxxxp@gmail.com", "Gustavo Web", "rxxxxxxl@hotmail.com", "Gustavo"); +$email->sendEmail("Subject", "Content", "reply@email.com", "Replay Name", "address@email.com", "Address Name"); -var_dump($novoEmail); \ No newline at end of file +var_dump($email); \ No newline at end of file