|
| |
|
|
winglestar
Posts: 12 Joined: 3/7/2002 From: Status: offline
|
ASPmail - 6/29/2004 6:03:53
I am new to asp and cannot work out why the following script will not work. I have placed the two files in the root of my website. My host is running aspmail 3 Saved as forminfo.asp <% @LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <% Set Mail = Server.CreateObject("SMTPsvg.Mailer") 'create an Asp mail component. Mail.FromName = "1&1 Test" Mail.FromAddress= Request.Form("info@kineticadesign.co.uk") Mail.RemoteHost = "mrvnet.kundenserver.de" ' The mail server you have to use with Asp Mail Mail.AddRecipient "Your Name", "info@kineticadesign.co.uk" Mail.Subject = "Website - Info Request" Mail.BodyText = Request.Form("Info") if Mail.SendMail then ' Response.Write "Your mail has already been sent..." else ' Response.Write "Mail send failure. Error was " & Mail.Response end if %> <body background=""> <p> Thank You!!<br> Your message has been successfully sent, you should recieve a reply within two working days.</p> </body> </html> Saved as form.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>ASP Mail Test page</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body background="" > <table width="100%" border="0" align="center"> <tr class="medium"> <td width="54%" align="center" valign="top"> <form onSubmit="return ValidateForm()" name="form1" method="post" action="forminfo.asp"> <p class="fancycentre" align="left">Email Address <input name="email" type="text" id="email" size="41"></p> <p class="fancycentre" align="left"> </p> <p class="fancycentre" align="left">Please enter your stuff below:</p> <p class="fancycentre" align="left"><br> <textarea name="info" cols="35" rows="10" id="textarea3"></textarea></p> <p class="fancycentre" align="left"> <input class="fancybut" type="submit" name="Submit" value="Submit Form"> <input class="fancybut" type="reset" name="Submit2" value="Reset Form"></p> </form></td> <td width="16%" align="right" valign="top"></td> </tr> </table> </body> </html> Hopefully some one can help as this is driving me mad - obviuosly does not help being a newbe to ASP either !!!
|
|
|
|
fatlardo
Posts: 76 Joined: 4/15/2004 From: Shrewsbury Status: offline
|
RE: ASPmail - 6/29/2004 7:49:32
quote:
Mail.FromAddress= Request.Form("info@kineticadesign.co.uk") Are you sure you should have info@kineticadesign.co.uk in your request.form part? Shouldn't it be request.form("email"). Otherwise you code looks sound. (Im not too sure about the defining object bit as I don't know how t use it myself so don't quote me as that being the only problem!) Hope it helps.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|