Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send email thru ASP.NET with SMTP Auth
Message
De
23/06/2006 22:11:18
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Send email thru ASP.NET with SMTP Auth
Versions des environnements
Environment:
ASP.NET
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01131364
Message ID:
01131364
Vues:
110
Dear Expert,

I wrote below codes for sending email thru ASP.NET.. but my SMTP server requires authentication, please help ..

Imports System.Net.Mail

...
...
...

Try

Dim SendFrom As MailAddress = New MailAddress(mFromAddr)
Dim SendTo As MailAddress = New MailAddress(pTo)
Dim MyMessage As MailMessage = New MailMessage(SendFrom, SendTo)

MyMessage.Subject = pSubject
MyMessage.Body = pBody & vbCrLf & NoReply_Note

Dim mAttachment As String = ""
Dim attachFile As New Attachment(pAttachment)
MyMessage.Attachments.Add(attachFile)

Dim emailClient As New SmtpClient(mSMTP)

emailClient.Send(MyMessage)

...
...

Catch ex As Exception

...

End Try

Thanks & Regards
Winanjaya
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform