<?php if(isset($_REQUEST['send'])) { $t=$_POST['to']; $s=$_POST['subject']; $b=$_POST['body']; require_once('phpmailer/class.phpmailer.php'); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth = true; $mail->SMTPDebug = 1; $mail->SMTPSecure = "ssl"; $mail->Username = "kakminder@gmail.com"; $mail->Password = "; $mail->Host = "smtp.gmail.com"; $mail->Mailer = 'smtp'; $mail->Port = 465; $mail->SetFrom('asd@gmail.com', 'asd'); $mail->Subject = $s; $mail->Body = "helo testing mail"; $mail->AddAddress($t); $mail->AddAddress('saini.1985@gmail.com','deepak'); $mail->AddAddress('akm@rediffmail.com','akm'); $mail->Send(); } ?> <html><h1>Sending mail</h1> <body> <form> <table align="center" border="1"> <tr><td>to</td><td><input type="text" name="to" /></td></tr> <tr><td>subject</td><td><input type="text" name="subject" /></td></tr> <tr><td>body</td><td><input type="text" name="body" /></td></tr> <tr><td><input type="submit" name="send" value="send" /></td></tr> </table></form></body></html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)