visto Posted December 16, 2007 Share Posted December 16, 2007 I am going to change host and therefore change my ASP things to PHP. Can someone help med with a PHP script that does the same job as the ASP script below: In the form on the html-webpage you have to write 1) your name, 2) your mailadresse 3) by means of radio buttons chose between getting the newsletter or being removed from the mailinglist. In ASP the script is: <% set msg = Server.CreateOBject( "JMail.Message" ) msg.Logging = true msg.silent = true msg.ContentType = "text/html" msg.From = Request.Form("Email") msg.FromName = Request.Form("Name") msg.AddRecipient "info@mydomaine.dk", "mydomaine.dk" msg.Subject = "Concerning newsletter" msg.Body = "Fra:<br>" & Request.Form("Name") & "<br><br>Email:<br>" & Request.Form("Email") & "<br><br>Wish:<br>" & Request.Form("M") if not msg.Send("localhost" ) then Response.write "<pre>" & msg.log & "</pre>" else Response.write "<p class=""message""><br><br>You shall have a confirmation when you are registred</p>" end if Set msg = Nothing %> (I can see that pre- and br-tags were removed above), so the script is not accurate, but I hope you get the idea.) Quote Link to comment Share on other sites More sharing options...
trq Posted December 16, 2007 Share Posted December 16, 2007 You want use to write it for you? Thats not how this forum works, take a look at the mail function. If you need the basics, theres a nice free book in my signiture. Quote Link to comment Share on other sites More sharing options...
revraz Posted December 16, 2007 Share Posted December 16, 2007 There are so many posts here about mail that I'm sure you would find a working example in less than 15 minutes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.