ERLEDIGT
JA
JA
ANTWORTEN
2
2
ZUGRIFFE
1995
1995
EMPFEHLEN
-
Hallo,
ich möchte beim klick auf Button_1 den Inhalt der Textboxen 1 und 2 automatisch an eine festgelegte E-Mail Adresse versenden. Kann mir vielleicht jemand weiterhelfen? Danke schon mal im vorraus
-
20.03.08 00:04 #2Konstantin Denerz Tutorials.de Gastzugang
Hi,
hier ist ein Beispiel für den Versand von Email über den SmtpClient von .NET. Ich versende dabei eine Email an einen GMail-Account mit SSL und Authentifizierung.
Code vb:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Imports System Imports System.Collections.Generic Imports System.Linq Imports System.Text Imports System.Net.Mail Imports System.Net Namespace SmtpClientExample Class Program Private Shared Sub Main(ByVal args As String()) Dim from As New MailAddress("konstantin.denerz@googlemail.com") Dim [to] As New MailAddress("konstantin.denerz@googlemail.com") Dim subject As String = "Testmail" Dim body As String = "Hello Bubu!" Dim message As New MailMessage(from, [to]) message.Subject = subject message.Body = body Dim client As New SmtpClient("smtp.googlemail.com", 587) client.EnableSsl = True client.Credentials = New NetworkCredential("username", "password") client.Send(message) Console.WriteLine("complete...") Console.ReadLine() End Sub End Class End Namespace
Gruß KonstantinGeändert von Konstantin Denerz (13.09.08 um 23:21 Uhr)
-
Danke, werd ich gleich mal ausprobieren
Ähnliche Themen
-
Outlook Xp Email Versand
Von herbi1011 im Forum Office-AnwendungenAntworten: 0Letzter Beitrag: 02.02.05, 01:14 -
HTML-Email-Versand
Von toblerone01 im Forum PHPAntworten: 1Letzter Beitrag: 07.12.04, 19:54 -
Automatischer Email-Versand
Von Alain im Forum PHPAntworten: 3Letzter Beitrag: 24.09.04, 13:50 -
Email-Versand per Outlook XP
Von Maximus im Forum Office-AnwendungenAntworten: 7Letzter Beitrag: 11.09.03, 15:22





Zitieren
Login





