-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into modifcategorie
- Loading branch information
Showing
39 changed files
with
1,838 additions
and
402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace App\Controllers; | ||
|
||
use CodeIgniter\HTTP\RequestInterface; | ||
use CodeIgniter\HTTP\ResponseInterface; | ||
use Psr\Log\LoggerInterface; | ||
|
||
/** | ||
* Mail controller | ||
*/ | ||
class MailController extends \CodeIgniter\Controller | ||
{ | ||
/** | ||
* Cette méthode permet d'envoyer un mail | ||
* @param $mailto String l'adresse mail du destinataire | ||
* @param $subject String le sujet du mail | ||
* @param $body String le corps du mail | ||
*/ | ||
public function sendMail($mailto, $subject, $body) { | ||
$email = \Config\Services::email(); | ||
|
||
$email->setFrom('contact@dometlien.fr', 'Ne pas répondre'); | ||
// ou $email->setFrom('nepasrepondre@portailsaad.fr', 'Ne pas répondre'); Mais cette ligne leve une erreur à la reception du mail | ||
$email->setTo($mailto); | ||
|
||
$email->setSubject($subject); | ||
$message = $body; | ||
$email->setMessage($message); | ||
$email->send(); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.