Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send Email from VB.NET
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00851402
Message ID:
00851641
Vues:
9
This is a very generic exception message sent from CDO. Check the ex.InnerException.Message error message. It usually has to do with the Relay Agent setting of your SMTP server.


>I have made a real simple email client that works. However, the email is sent but it just takes for ever to get delivered. Why is that? The exact same email sent to the same address through the same ISP servers when sent through Outlook is virtually instant.
>
>When I try to send though the local SMTP service on Win 2000 AS I get "Error!! Could not access 'CD).Message' object"
>
>My code is below... .. please help
>
>TIA
>Winanjaya
>
>
> Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click
> Dim email As New MailMessage
> If txtSmtpServer.Text <> "localhost" Then
> SmtpMail.SmtpServer = Trim(txtSmtpServer.Text)
> End If
>
> email.To = Trim(Me.txtTo.Text)
> email.From = Trim(Me.txtFrom.Text)
> email.Subject = Trim(Me.txtSubj.Text)
> email.Body = Trim(Me.txtBody.Text)
> email.BodyFormat = MailFormat.Text
> email.Priority = MailPriority.High
>
> Try
> SmtpMail.Send(email)
> MsgBox("Email Sent!!!", MsgBoxStyle.Information)
> Catch ex As Exception
> MsgBox("Error!!" + vbLf + ex.Message, MsgBoxStyle.Critical)
> End Try
> End Sub 'btnSend_Click
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform