-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresetpassword.php
More file actions
35 lines (27 loc) · 916 Bytes
/
resetpassword.php
File metadata and controls
35 lines (27 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/* // Please specify your Mail Server - Example: mail.example.com.
ini_set("SMTP","smtp.gmail.com");
// Please specify an SMTP Number 25 and 8889 are valid SMTP Ports.
ini_set("smtp_port","465");
// Please specify the return address to use
//ini_set('sendmail_from', 'nitesh.mishra143@gmail.com');
$to = "nitesh.mishra143@gmail.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "nitesh.mishra143@gmail.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
*/
//set SMTP php.ini
ini_set("SMTP", "smtp.gmail.com");
//echo ini_get("SMTP");
ini_set("smtp_port","25");
//setup variables
$to = $_POST['email'];
$subject = "Email from PHPAcademy";
$headers="From: nmmishra.iipsmca@gmail.com";
$body ="This email from name\n\n message";
mail($to, $subject, $body, $headers);
echo "Mail Sent."
?>