Hello, I insert data in my database (with a form). Then I try to sent this data with a mail but I receive "ERR_EMPTY_RESPONSE". Do you have any ideas of the meaning of this mistake. Thank in adavance, Frédérick.
We don't support SQL Mail. (Just letting you know just in case you're using it.) How exactly are you trying to send the email message? What settings are you using and what code?
Hello, I don't use sql mail. I use MailMessage() within a class that I Created. First, I save in my database what the user encode in a form: InsertRecetteAttendue(TreReatNIdn, TreReatLComStrPar1, TreReatLComStrPar2, TreReatLComStrPar3, TreReatMMnt, "EprInsc", EprEpreNIdn, EprInscNIdn) Then I read a page formatted with the data saved: Dim wb As System.Net.WebClient = New System.Net.WebClient wb.Encoding = System.Text.Encoding.UTF8 Dim mail As String Try mail = wb.DownloadString("http://www.triathlon-namur.be/TriathlonDeNamur/Emails/EmailConfirmationInscription.aspx?nidn=" & EprInscNIdn) Catch ex As Exception mail = ex.Message End Try Finally I sent a mail Dim email As EmailBLL = New EmailBLL email.FonctionPrimaire = True email.Subject = "[Triathlon de Namur] Confirmation de votre inscription" email.Body = mail email.AddTo("[email protected]") email.Send() email = Nothing Wihtout sending the mail, all go wright. But if I add the code to read the page and send the mail, I receive the error. If I do the same code in 2 steps, it's ok. First then use complete the form. He click OK, then I save the data in the DB. Then, if I click on a button to execute only then read of the page and the send of the mail, it's ok. Why all it's ok in two steps and why not in one step? Thanks.
To send mail from our web servers you need to use the SMTP service on our mail server. Read our knowledge base article here: http://support.Winhost.com/KB/a650/how-to-send-email-in-aspnet.aspx Notice that you need to use one of the email users you created in SmarterMail to authenticate against the SMTP service on our mail server.
Ok, I think I found my mistake. I used this: SmtpClient.Port = 587 And it seems it is not necessary to use it. Without this all is ok. Thank you.