hello there:
I am trying to send email messages from my web page to my account, as a support form. I mean, users go to my web page and can fill a form and send me a message to my email. For this I use two web pages, the first is a html page ant the second a aspx page, this way:
First Page contains the form:
<form id="form" enctype="multipart/form-data" action="enviar.aspx">
<div class="rowi">
<input name="txtDe" type="text" class="input" value="Nombre: " />
</div>
<div class="rowi">
<input name="txtEmail" type="text" class="input" value="E-mail:" />
</div>
<div class="rowt">
<textarea name="txtMensaje" cols="1" rows="1">Mensaje:</textarea>
<br />
<label>
<input name="Enviar" type="submit" id="Enviar" value="Enviar" />
</label>
</div>
</form>
<asp:Button ID="cmdEnviar" runat="server" OnClick="cmdEnviar_Click" Text="Enviar" />
Second page, gets the info from the form, creates the net.mail object and sends the email:
<%@ Page Language ="VB" debug="true" %>
<%@ Import Namespace="System.Net.Mail"%>
<%
On Error Resume Next
Dim objMail As New System.Net.Mail.MailMessage()
Dim Direccion As String = Request("txtEmail")
objMail.From = New MailAddress(Direccion)
objMail.To.Add("proyectos@ingesoingenieria.com")
objMail.Subject = "Contacto desde Página Web"
objMail.Priority = MailPriority.High
objMail.Body = "" & Request("txtDe") & " escribió: " & vbNewLine & vbNewLine & Request("txtMensaje")
Dim oclient As SmtpClient = New SmtpClient("mail.ingesoingenieria.com")
oclient.UseDefaultCredentials = False
oclient.Credentials = New System.Net.NetworkCredential("gmarquez@ingesoingenieria.com", "xxxxxxxx")
objMail = Nothing
oclient = Nothing
%>
the problem is that I DON'T GET ANY MESSAGE. Can anyone help me?