<HTML> <HEAD> <title>WebForm1</title> <script language="vbscript" runat="server"> SUB MYMAIL(A AS OBJECT,E AS EVENTARGS) DIM MAILOBJ AS NEW MAILMESSAGE MAILOBJ.FROM=FROMADDRESS.text MAILOBJ.TO=TOADDRESS.text MAILOBJ.CC=CCADDRESS.text MAILOBJ.BCC=BCCADDRESS.text MAILOBJ.SUBJECT=SUBJECT.text mailobj.body=message.text 'IF LEN(ATTACHMENTS.text)>0) THEN ' MAILOBJ.ATTACHMENTS.ADD(NEW MAILATTACHMENT(ATTACHMENTS.text)) ' else 'response.write("No attchments found") 'end if try SMTPmail.send(mailobj) status.text="message sent successfully" catch ex as exception status.text="message not sent" 'response.write(ex.message) end try END SUB sub clearBOX(sender as object,e as eventargs) FROMADDRESS.TEXT="" TOADDRESS.TEXT="" CCADDRESS.TEXT="" BCCADDRESS.TEXT="" SUBJECT.TEXT="" MESSAGE.TEXT="" status.text="" end sub </script> <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"> <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE"> <meta content="JavaScript" name="vs_defaultClientScript"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> </HEAD> <body bgColor="gainsboro"> <form id="Form1" method="post" runat="server"> <table> <TBODY> <tr> <th> MESSAGE FULL EX</th></tr> <tr> <td>FROM</td> <TD width="400"><asp:textbox id="FROMADDRESS" Width="296px" Runat="server"></asp:textbox></TD> </tr> <tr> <td>TO </td> <TD><asp:textbox id="TOADDRESS" Width="296px" Runat="server"></asp:textbox></TD> </tr> <tr> <td>CC </td> <td><asp:textbox id="CCADDRESS" Width="296px" Runat="server"></asp:textbox></td> </tr> <tr> <td>BCC </td> <TD><asp:textbox id="BCCADDRESS" Width="296px" RUNAT="server"></asp:textbox></TD> </tr> <tr> <td>SUBJECT</td> <td><asp:textbox id="SUBJECT" Width="296px" Runat="server"></asp:textbox></td> </tr> <tr> <TD>ATTACHMENTS</TD> <TD><asp:textbox id="ATTACHMENTS" Width="296px" Runat="server" Height="24px"></asp:textbox></TD> </tr> <tr> <td style="HEIGHT: 127px">MESSAGE</td> <td style="HEIGHT: 127px"><asp:textbox id="message" Width="296px" Runat="server" Height="146px"></asp:textbox></td> </tr> <tr> <td>SEND</td> <td><asp:button id="B1" onclick="MYMAIL" Width="104px" Runat="server" Height="22px" Text="SEND"></asp:button><asp:button id="b2" onclick="clearbox" runat="server" Width="112px" Height="22px" Text="Newmail"></asp:button></td> <td></td> </tr> <tr> <td><asp:label id="status" Runat="server"></asp:label></td> </tr> </TBODY> </table> </form> </body></HTML>