Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,148,858 members, 7,802,750 topics. Date: Friday, 19 April 2024 at 08:43 PM |
Nairaland Forum / Science/Technology / Programming / Web Form That's Submitted To An Email Address (1509 Views)
Who's In Need Of An Email Processing Job? / Is There An Email To Sms Gateway Service From Airtel, Glo, Mtn Or Etisalat? / How To Make A Checkbox Required On An Email Form Read More (2) (3) (4)
Web Form That's Submitted To An Email Address by chinesedoll(f): 10:29am On May 26, 2006 |
Hi guys anybody here who can give me a code whereby if a form is submitted it goes to an email address instead of a database It could be PHP C# OR ASP.NET. i NEED IT URGENTLY. |
Re: Web Form That's Submitted To An Email Address by tundeajiba(m): 1:56pm On May 26, 2006 |
visit this site http://www.boaddrink.com |
Re: Web Form That's Submitted To An Email Address by IAH(f): 2:00pm On May 26, 2006 |
Google "php form emailer script" or "asp form emailer script". You’ll find free ones to lift. |
Re: Web Form That's Submitted To An Email Address by Zahymaka(m): 3:24pm On May 26, 2006 |
ruky_ivy, from a previous post of yours, I assume you're more comfortable with Asp.NET. I'm more inlined towards C# but I'll give you the code in both C# and VB. C# using System.Web.Mail; // the .NET mail namespace MailMessage myMailMsg = new MailMessage(); myMailMsg.Subject = "Subject of Mail"; myMailMsg.To = "recipient@example.com"; myMailMsg.From = "sender@example.com"; // you can add myMailMsg.Cc and myMailMsg.Bcc myMailMsg.BodyFormat = MailFormat.Text; // can be either MailFormat.Text or MailFormat.HTML myMailMsg.Priority = MailPriority.Normal; //can be either MailPriority.High, MailPriority.Normal or MailPriority.Low myMailMsg.Body = "your body"; // you can append the body from a textbox eg myMailMsg.Body = txtComments.Text; SmtpMail.Send(myMailMsg); // send message VB Imports System.Web.Mail ' the .NET mail namespace Dim myMailMsg as MailMessage = new MailMessage myMailMsg.Subject = "Subject of Mail" myMailMsg.To = "recipient@example.com" myMailMsg.From = "sender@example.com" 'you can add myMailMsg.Cc and myMailMsg.Bcc myMailMsg.BodyFormat = MailFormat.Text 'can be either MailFormat.Text or MailFormat.HTML myMailMsg.Priority = MailPriority.Normal 'can be either MailPriority.High, MailPriority.Normal or MailPriority.Low myMailMsg.Body = "your body" 'you can append the body from a textbox eg myMailMsg.Body = txtComments.Text SmtpMail.Send(myMailMsg) 'send message As you can see, the code is very similar. It's been long since I did anything Asp.NET but if you run into any snags [especially exceptions] you can always reply here. |
Re: Web Form That's Submitted To An Email Address by smartsoft(m): 9:55am On May 29, 2006 |
Step 1:: Make a page called contact.php and paste this code into it. <form action="contactme.php" mehod="post"> Step 2:: Make a new page and paste the code below into it and name it contactme.php <?PHP |
Re: Web Form That's Submitted To An Email Address by Zahymaka(m): 12:44pm On May 29, 2006 |
smartsoft, I'm sure you didn't mean to make a mistake but using $comments instead of $_POST['comments'] in PHP only works if register_globals is turned to On. |
Re: Web Form That's Submitted To An Email Address by skima(m): 1:52pm On May 30, 2006 |
Am very sure he must be coding with register_global=on. But this is not advisible. Enhanced code : works in any environment that supports php and support sendmail. <?PHP |
Re: Web Form That's Submitted To An Email Address by smartsoft(m): 12:08pm On May 31, 2006 |
i just knew that my register_global is kinda on, i better stop doing that hey bravo everybody who notice that |
(1) (Reply)
Need A Free Integrated C/C++ Compiler / Creating Mobile Apps As A Tool For Creating More Job In Nigeria / Here Are 8 Amazing Uses Of Java!
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 27 |