<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Contact_Us Form</title> <link href="StyleSheetcontactus.css" rel="stylesheet" /> </head> <body> <div class="contact-title"> <h1>Contact Us</h1> </div> <div class="contact-form"> <form id ="contact-form" method="post" action=""> <input name="name" type="text" class="form-control" placeholder="Enter Name" required="" /><br /> <input name="contact No." type="text" class="form-control" placeholder="Enter Contact no." required="" /><br /> <input name="email" type="email" class="form-control" placeholder="Enter Email" required="" /><br /> <input name="city" type="text" class="form-control" placeholder="Enter City" required="" /><br /> <textarea name="message" class="form-control" placeholder="Enter Message" rows="5" required=""></textarea><br /> <input type="submit" class="form-control submit" value="Send Message" /> </form> </div> </body> </html>
WebClient client = new WebClient(); string url = "http://manage.staticking.net/index.php/smsapi/httpapi/?uname=smarthitech&password=internet111&sender=WIFIND&receiver=" + mobile + "&route=TA&msgtype=1&sms=Dear User your OTP For signup to WIF India Fashion Pvt. Ltd. is " + phoneotp + " with the confirmation of your phone No. please keep it secure"; try { Stream data = client.OpenRead(url); StreamReader reader = new StreamReader(data); string s = reader.ReadToEnd(); data.Close(); reader.Close(); } catch (Exception ex) { Message.Show(ex.Message); } //main code to send email MailMessage email1 = new MailMessage(); email1.From = new MailAddress("wifindia123@gmail.com"); email1.To.Add(email); email1.Subject = "Your Wifindia OTP:"; email1.Body = "Dear User your OTP For signup to WIF India Fashion Pvt. Ltd. is " + emailotp + " with the confirmation of your Email ID please keep it secure"; email1.BodyEncoding = System.Text.Encoding.UTF8; email1.IsBodyHtml = true; SmtpClient smtpc = new SmtpClient("smtp.gmail.com", 587); smtpc.EnableSsl = true; String UserId = "wifindia123@gmail.com"; String Pass = "wifindiafashion@"; smtpc.UseDefaultCredentials = false; smtpc.Credentials = new NetworkCredential(UserId, Pass); smtpc.Send(email1); Message.Show("Otp has sent to your Email(Inbox or spam) and Mobile ");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)