Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require './email/PHPMailerAutoload.php';
- try {
- $mail = new PHPMailer(true);
- // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = "smtp.gmail.com";
- $mail->SMTPDebug = 0;
- // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'emaildyalek'; // SMTP username
- $mail->Password = 'code dyal email dyalek '; // SMTP password
- $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 587; // TCP port to connect to
- $mail->setFrom('email dyalek ', 'anas mansouri food project ');
- $mail->addAddress('rizkiyounes8991@gmail.com'); // Add a recipient
- $mail->addReplyTo('email dyalek ');
- // print_r($_FILES['file']); exit;
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = "test ";
- $mail->Body = '<div style="border:2px solid red;">Hello world</div>';
- $mail->AltBody = "msg from GSEII";
- if ($mail->send()) {
- echo "message envoyer";
- } else {
- echo "error" . $mail->ErrorInfo;
- }
- } catch (Exception $e) {
- echo "lsd";
- }
- // header("location: https://www.facebook.com/");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement